when try acquire token azure ad b2c app using
microsoft.identitymodel.clients.activedirectory - 3.13.1
microsoft.azure.activedirectory.graphclient - 2.1.0
like this:
var authuri = "https://login.microsoftonline.com/6b7403d6-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/token"; var clientid = "59e08b82-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; var appkey = "xxxx-myappkey-xxxx"; var graphuri = "https://graph.windows.net/6b7403d6-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; var authenticationcontext = new authenticationcontext(authuri, false); var clientcred = new clientcredential(clientid, myappkey); var authenticationresult = await authenticationcontext.acquiretokenasync(graphuri, clientcred);
i get
[adalserviceexception: aadsts70001: application '59e08b82-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not supported api version.
is there library can use in asp.net mvc 5 (.net 4.5) access b2c active directory created using ui of new azure portal, not powershell example?
(the xxxx's privacy here)
you don't need power shell creation more, msft have given permission add new application in azure ad(not in azure b2c), can used access graph api in azure b2c. need follow below steps in https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-devquickstarts-graph-dotnet
only deleting access graph api need power-shell magic...
Comments
Post a Comment