You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
git clone project, load in Android Studio, update B2CConfiguration.java (Custom Policy), build/run the app in Android Studio, select B2C, run flow
Any log messages given by the failure
2020-04-09 15:03:25.392 9962-9962/com.azuresamples.msalandroidapp D/B2CModeFragment: Authentication failed: com.microsoft.identity.client.exception.MsalClientException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
I had the same issue when attempting to login on B2C.
In my case I decided to register my Own Application.
What was missing for me was the read scope.
You need to expose an API
and then assign the permission and grant admin consent:
On B2CConfiguration.java update the URL:
/**
* Returns an array of scopes you wish to acquire as part of the returned token result.
* These scopes must be added in your B2C application page.
*/
public static List<String> getScopes() {
return Arrays.asList(
"https://YOURTENANT.onmicrosoft.com/b2c/demo.read");
}
This issue is for a: (mark with an
x
)Minimal steps to reproduce
git clone project, load in Android Studio, update B2CConfiguration.java (Custom Policy), build/run the app in Android Studio, select B2C, run flow
Any log messages given by the failure
2020-04-09 15:03:25.392 9962-9962/com.azuresamples.msalandroidapp D/B2CModeFragment: Authentication failed: com.microsoft.identity.client.exception.MsalClientException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
This is the same issue as observed in another MSAL sample Azure-Samples/ms-identity-android-native#15
Expected/desired behavior
MSAL auth to work.
OS and Version?
Versions
10.0.18362.720
Mention any other details that might be useful
Android Studio 3.6.2
The text was updated successfully, but these errors were encountered: