2
votes

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
Do you finish creating the web application and get the clientid and key?Lily_user4045
What's the 33d8d9ba-8c07-462a-8936-23387ddb4x5e?Lily_user4045
Are your running the sample codeor your own custom code? I can verify the sample code works fine, but if it's your own custom code, please provide more details about your code? One possible cause of this issue is lack of permission, have you assign permissions to the registered application? You need to run that Add-MsolRoleMember command and assign three roles to your application in that article your provided.forester123

1 Answers

1
votes

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