Maybe this will help point you in the right direction.
The error AADSTS1000031: Application cannot be accessed at this time usually means that:
The Azure AD app registration is not properly configured or
The user/account doesn’t have consent or permissions to access the app.
Try the following:
1. Verify App Registration
Make sure the app is not disabled in Azure Portal.
Ensure it is multi-tenant if you're using /common/ in the URL.
2. Check API Permissions
Go to Azure > App Registrations > Your App > API permissions.
Confirm that Delegated permissions are added and admin consent is granted.
3. Consent Flow
Try accessing with a global admin first to provide initial consent, especially for multi-tenant apps.
4. Avoid Using /common/
If possible, replace /common/ with your actual tenant ID in the authorize URL to avoid tenant mismatch issues.
Let me know if you'd like help reviewing your app registration.
Mark below checkbox to make this answer Verified if it helps you.