Questions tagged [microsoft-identity-web]
111 questions
0
votes
1 answer
Validating a JWT from AzureAD using Microsoft.Identity.Web succeeds but then fails in the same call
I have an API that I need to secure with AzureAD so that it can use SSO.
The API has a Swagger UI, so I have (after reading many, many tutorials/explanations/issues):
Created an App Registration in Azure
Created a scope for my API
Added my scope as…

VaticanUK
- 1,127
- 1
- 9
- 24
0
votes
1 answer
ASP.NET Core - Azure Active directory Authentication - Unable to obtain configuration from: 'System.String'
I have a .NET Core 2.2 / Angular 10 app where I want to implement an Azure AD login. The app already has a simple user/password login using JWT:
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme =…

Maxim
- 227
- 2
- 14
0
votes
1 answer
Microsoft.Identity.Web OnTokenValidated event doesn't seem to play nicely with async
I've been struggling with the Func that I attach to OnTokenValidated not doing what it should be.
After lots of trying different things:
services.Configure(options =>
{
options.Events ??= new OpenIdConnectEvents();
…

VaticanUK
- 1,127
- 1
- 9
- 24
0
votes
0 answers
AddDownstreamWebApi fails after adding multiple auth schemes
Problem: My as an app calls to a downstream web api throw a null exception error after adding my own jwt bearer authentication.
I have a .net 5 web API, call it AppAPI, whose ConfigureServices has the following code:
var accessTokenKey =…

hada
- 137
- 2
- 6
0
votes
1 answer
Multiple Authentication in ASP.NET Core
The authentication (Cookie) of my project is set as below,
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.DefaultScheme =…

Murat Durak
- 15
- 1
- 3
0
votes
1 answer
How to set secure on .AspNetCore.OpenIdConnect.Nonce and .AspNetCore.Correlation cookies?
I've got an ASP.NET Core 6 MVC Razor pages application using Microsoft Identity for AzureAD integrated authentication running on an Azure Linux AppService plan (with forced HTTPS).
The authentication integration works like a charm. Couldn't be…

user2845090
- 147
- 3
- 14
0
votes
0 answers
Microsoft Identity Platform and ValidAudiences
I am working on updating our API (core 3.1) auth to use the latest Microsoft Identity nuget for use with MSAL for an Angular UI application. We have Azure Functions that will call into our API's using a Managed Service Identity and have setup…

Mike Dunham
- 1
- 2
0
votes
1 answer
Problem calling Microsoft Graph from ASP.NET Grpc service
I have two applications -
public client application (.NET Core console app), in which user gets Microsoft identity access token
web API, which tries to call Microsoft Graph on-behalf-of user, using that access token
When I call Microsoft Graph…

Владимир Лопаткин
- 39
- 4
0
votes
1 answer
Mixed authentication and single sign on with Azure Active Directory and ASP.NET Core
I am working on an existing ASP.NET Core 3.1 web API. The existing authentication scheme is JWT. There is a new requirement that we support Single Sign on using Azure Active Directory.
So, I thought that the strategy I want to follow is to…

chr1st0scli
- 101
- 6
0
votes
1 answer
Microsoft.Identity.Web.MicrosoftGraph, AddMicrosoftGraph isn't injecting a GraphServiceClient that is properly authenticated
I have a Blazor WASM client application that is trying calling an aspnet web api. From the web API, I am trying to use the Microsoft Graph SDK with delegated permissions.
On the server, when I retrieve an instance of GraphServiceClient through…

Dave
- 3,676
- 4
- 28
- 39
0
votes
0 answers
Monitor cache memory in Azure
We'd like to host an ASP.NET Core 3.1 application in Azure. We are considering to use Microsoft.Identity.Web for authentication. In it, there is an option to use AddInMemoryTokenCaches (also AddSessionTokenCaches and AddDistributedTokenCaches more…

dzookatz
- 213
- 4
- 17
0
votes
2 answers
GraphServiceClient not working with Microsoft Identity Web in Razor Page model
I have a situation where I can successfully use GraphServiceClient in my Startup but not in my Razor Page. I am using Microsoft Identity Web with Microsoft Graph and have followed the MS Documentation here and also checked many other similar issues…

OjM
- 1,029
- 2
- 17
- 32
0
votes
1 answer
Issue in Azure Ad authentication. Error: Unable to unprotect the message.State
When I try to authenticate I get the following error
2021-10-01T11:19:46.162027114Z: [INFO] : Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
2021-10-01T11:19:46.162072114Z: [INFO] An unhandled exception has occurred while…

agarwal
- 46
- 4
0
votes
2 answers
Microsoft.Identity.Web.UI works locally but not in App Service
I've been trying to add auth to my web app following: https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/1-WebApp-OIDC/1-1-MyOrg
If I run locally with appsettings.Development.json via dotnet run, I can…

Chris Sherry
- 11
- 5
0
votes
0 answers
Safari infinite loop when using SameSiteLax with Microsoft Identity Web Web App with Azure AD login
This is related to this question I asked earlier. Sadly, I still have this issue.
MY problem is as follows:
Be logged in at Microsoft with 2 accounts. For example, go to the Azure portal and log in with 1 account, then sign in with another.
Go to…

S. ten Brinke
- 2,557
- 4
- 25
- 50