This error occurs when your application isn't allowed to request an authorization code.
Possible causes
- Your application isn't registered in Azure AD.
- Your application wasn't added to the user's Azure AD tenant.
What to do
When this happens you can have the application prompt the user with instructions for installing the application and adding it to Azure Active Directory, (AD).