Thanks for reaching out to Microsoft!
To resolve this issue, first ensure that your subscription is active and compliant, as a lapsed subscription could be the cause.
If you already have an active, compliant subscription and the application is enabled for user sign-in, I will also recommend trying these steps:
- Verify if the application is enabled in the Entra portal. Make sure that the application is not disabled by the administrator. You can check this by going to the "App registrations" in the portal.
Ensure that the necessary permissions are granted to the application.
If the service principal is disabled, you can re-enable it using Microsoft Graph. Send a PATCH request to /servicePrincipals/{servicePrincipalObjectId}
with the following payload:
{
"accountEnabled": true
}
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.