Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

AcquireTokenAsync fails if scopes are capitalized #275

Closed
jasonjoh opened this issue Dec 9, 2015 · 1 comment
Closed

AcquireTokenAsync fails if scopes are capitalized #275

jasonjoh opened this issue Dec 9, 2015 · 1 comment

Comments

@jasonjoh
Copy link

jasonjoh commented Dec 9, 2015

Repro setup: Basic WPF application, Visual Studio 2015, latest pre-release experimental version of the library.

This code results in a null `AuthenticationResult.Token':

string[] scopes = { "https://outlook.office.com/Mail.Read" };
AuthenticationResult result = null;
result = await authContext.AcquireTokenAsync(scopes, null, clientId, 
  redirectUri, new PlatformParameters(PromptBehavior.Auto, null));

Changing the scopes to an all-lowercase version fixes it:

string[] scopes = { "https://outlook.office.com/mail.read" };

Using `https://outlook.office.com/Mail.Read' should be valid. If you check the network traffic a token is returned, the library just decides it isn't valid and doesn't return it.

@kpanwar
Copy link
Contributor

kpanwar commented Jul 25, 2016

Please use MSAL instead of experimental.

@kpanwar kpanwar closed this as completed Jul 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants