-->

Graph API - Azure AD B2C - throws error - Applicat

2019-07-09 06:09发布

问题:

I was following the below link to setup the Azure AD B2C- with Graph API setup

https://azure.microsoft.com/en-in/documentation/articles/active-directory-b2c-devquickstarts-graph-dotnet/

I was able to proceed with powershell command settings, but when I try with the application, when it executes the below code,

 authContext.AcquireToken("https://graph.windows.net", credential); 

getting error like below, what is wrong with this ?

AADSTS70001: Application with identifier '33d8d9ba-8c07-462a-8936-23387ddb4x5e'
was not found in the directory abc.onmicrosoft.com
Trace ID: b858d725-fbaa-4a39-8da1-84ef2a82a0a9
Correlation ID: da7c254e-a10e-4df6-9965-215685447e74
Timestamp: 2016-03-29 06:40:23Z

How to resolve this. Any inputs appreciated.

回答1:

Thanks for your comments, finally found the problem.

by executing the below command, found the application was not created.

Get-MsolServicePrincipal -AppPrincipalId 33d8d9ba-8c07-462a-8936-23387ddb4x5e.

I recreated the application and tried, things seems working.

I had an similar issue, this also got resolved

Error - Connect-MsolService : Your credentials could not be authenticated. Try again

If you have any problem creating the application on powershell, follow the solution provided in this below issue.

Several Azure AD. New-MsolServicePrincipal : Access Denied