Questions tagged [microsoft-identity-platform]

150 questions
8
votes
4 answers

IDW10201: Neither scope or roles claim was found in the bearer token

I have a ASP.NET Core 3.1 project like this sample: Sign-in a user with the Microsoft Identity Platform in a WPF Desktop application and call an ASP.NET Core Web API. I'm using Identity web version 1.0 and Azure AD, single-tenant application. I've…
7
votes
1 answer

CompactToken validation failed 80049228

Some users are getting this error back when trying to sign in using Microsoft Sign In in order to access mail via MS Graph. I've had both corporate users and personal (Hotmail.com) users both showing this error number but it works fine for most…
mike nelson
  • 18,814
  • 13
  • 59
  • 66
5
votes
1 answer

What's the difference between the Microsoft identity platform and ASP.NET Core Identity?

What's the difference between the Microsoft identity platform and ASP.NET Core Identity? The former is mentioned in the latter's documentation, but it's not clear to me the difference between the two.
5
votes
1 answer

MS Identity Azure app registered but sends unauthorized_client in implicit flow

I have registered an app in Azure for Microsoft Identity platform. I configured it to allow MS Accounts (e.g. outlook.com) and have basically done everything in a few of the quickstarts online here and here (except for "add credentials to your web…
3
votes
0 answers

How to do integration tests with AzureAD, if 2FA is enabled

I am trying to set up integration tests in a project, where the application is secured by AzureAd (Microsoft.Identity.Web) and 2FA. Usually the user would log in to the application using a SPA, and would be greeted by the login popup or redirect.…
3
votes
3 answers

How do you get an Access Token from Azure Active Directory that the scaffolded Weather Forecast Api will accept?

I'm trying to build a new WebApi secured using access tokens from azure active directory. I'm using .net core v3.1 and visual studio 2019. I created a new project using the "Asp.net core web application" template and picked an "API" project and…
3
votes
1 answer

'IServiceCollection' does not contain a definition for 'AddSignIn' when using services.AddSignIn(Configuration, "AzureAdB2C") from template

I ran the templates from AzureAD/microsoft-identity-web for Razor Pages: dotnet new webapp2 --auth IndividualB2C Which created a project using // This method gets called by the runtime. Use this method to add services to the container. …
lcj
  • 477
  • 5
  • 12
3
votes
1 answer

How do I expose a custom API permission in Azure B2C? Only admins are supported

I'm following the B2C directions here to secure my API, however the Azure B2C portal doesn't expose this feature fully. Instead it only allows for Admin consent, not user consent. image of portal missing end user prompts Is this feature fully…
CMEdge
  • 93
  • 9
3
votes
0 answers

Is it possible to close the log-in window of Azure AD B2C after redirecting to an electron using the system browser?

Current Situation We built an Electron application that uses Web APIs guarded by Azure AD B2C. The authentication process happens as follows: User wants to log in Electron prepares the initial OIDC request (return type code with oidc scope…
3
votes
0 answers

Different authentication methods for MVC Controllers and WebAPI (Cookies+Bearer) using Microsoft Identity Platform

I have a web application that implements both MVC controllers and webapi controllers. This web application uses Microsoft account authentication based on external cookies. Now I want to query the webapi from a native (desktop) application using MSAL…
2
votes
2 answers

Azure SQL authenticate as user via API with MS Identity Platform

I have an ASP.NET Core 3.1 Web App calling an ASP.NET Core 3.1 Web API, which in turn accesses an Azure SQL database. Authentication is provided via MSAL (Microsoft Identity Platform) - i.e. using the relatively new Microsoft.Identity.Web and…
2
votes
1 answer

Exception getting Azure AD groups via MS Graph with ASP.NET Core

I want to retrieve all groups assigned to a logged in user when user signed in. So that the groups can be used for the user's logged-in session. I followed the code from the link…
2
votes
1 answer

Rare AADSTS7000215 error from Microsoft (Invalid client secret is provided)

Sometimes on trying to obtain token on: login.microsoftonline.com/common/oauth2/v2.0/token I receive the error: AADSTS7000215: Invalid client secret is provided I am sure that client_secret is correct and not expired. Most of the requests with the…
2
votes
3 answers

How do I connect to Exchange Online using OAuth 2.0 in MailKit?

I have a web application that sends e-mails to users via Exchange Online (Office365) using MailKit and Basic Authentication. Our company is MS partner and therefor is obligated to turn off Basic Authentication for our services by the end of february…
2
votes
1 answer

.NET Core add Claim after AzuerAD Authentication

My application signs in via AzureAD, but now I need to get information from the DB and then store the Role as a Claim. So my question is: How can I store the Role as Claim after authentication ? This is what I tried: var user = User as…
1
2 3
9 10