1
votes

I am trying to acquire an access token for a user by using the common endpoint with a Native Application. I've tried both login.windows.net/common/OAuth2/Authorize and login.windows.net/common as the authority for the AuthenticationContext.

Here is the function I am using:

authResult = authContext.AcquireToken(resource, clientID, redirectUri, PromptBehavior.Auto);

Here are the permissions for my application:

Windows Azure Active Directory: Access the directory as the signed-in user

Windows Azure Service management API: Access Azure Service Management as organization

When I try and authenticate I'm able to login in, but then I get the error:

AADSTS65001: The user or administrator has not consented to use the application with ID '{client ID}'. Send an interactive authorization request for this user and resource.

I can log in just fine using:

https://login.windows.net/{tenantID}/OAuth2/Authorize

but I want the user to be able to log in without knowing what their tenant ID is. Thank you for the help.

1

1 Answers

0
votes

It turns out you are not able to use the common endpoint with a Microsoft Account which is what I was doing. You are only allowed to use an Azure Active Directory Account.