Error AADSTS53000 raised after migrating from AAD graph api end point to Microsoft graph api.

VSree 1 Reputation point
2021-12-15T12:59:30.517+00:00

Hi

I'm trying to migrate my application from AAD graph api to Microsoft graph api endpoints. I get an error on the below line

string graphResourceId = "https://graph.microsoft.com/";
AuthenticationResult authResult = await authContext.AcquireTokenByAuthorizationCodeAsync(code, new Uri(appRedirectUrl), credentials, graphResourceId);

error raised:

AADSTS53000: Device is not in required device state: compliant. Conditional Access policy requires a compliant device, and the device is not compliant. The user must enroll their device with an approved MDM provider like Intune.

"interaction_required"

thanks,
VSree

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,568 questions
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 21,851 Reputation points Microsoft Employee
    2021-12-16T23:21:21.327+00:00

    Hi @VSree , this is an issue with your conditional access policy somewhere. This document details how you can check this. Please see if this applies to your environment and let me know.

    Thank you,
    James

    0 comments No comments