Closed wobo-swati closed 2 years ago
@wobo-swati This repository contains the MAM sample app code. If you have not been able to resolve this issue, please post a new issue in ms-intune-app-sdk-android. Please be sure to include the version of the MAM SDK you are using, along with the other details in the issue template.
Hi Team,
In our android app, I am unable to register the app for enrollment. Everything is set up according to sample which is provided but still i am receiving always "AUTHORIZATION_NEEDED" error code when i call registerAccountForMAM().
I am using MSAL with intune SDK and the app is registered as multi tenant. In AuthenticationCallback class : acquireToken(), i always get "AUTHORIZATION_NEEDED" notification status with below error
"com.microsoft.identity.client.exception.MsalUiRequiredException: AADSTS65001: The user or administrator has not consented to use the application with ID 'XXX' named 'XXX'. Send an interactive authorization request for this user and resource."
Error logs
Code in Application class in onCreate()
Login Code
Call back code
Acqure token() in MAMServiceAuthenticationCallback
I have tried various things here, sending our app read token, getting a token based on the resource id, etc. In that case i seem to get NOT_LICENSED.
Config File
Here acquireTokenSilent() call is always falling for me with "MsalUiRequiredException: AADSTS65001" error and not able to get the access token.
I would expect to get ENROLLMENT_SUCCEEDED as a result instead of AUTHORIZATION_NEEDED.