Microsoft Entra ID App not accessible to other organisations
Hi all,
I have an external PHP-based application that allows users to send emails via the Microsoft Graph API instead of SMTP which will be deprecated soon. For this, I registered an application under Entra App registrations with delegated permission scopes Mail.Send and offline_access. The app is configured to allow all types of Microsoft accounts, and during testing with personal and internal company Microsoft accounts, everything works perfectly. I'm using the authorization code flow for authentication:
- The user logs in.
- The user consents to the required permissions (prompt=consent).
- The user is redirected back to the application with an access and refresh token.
However, when a user with a external company (organizational) account tries to authorize the app, they encounter the following error after logging in:
AADSTS650053: The application 'My App Name' requested scope 'offline_access, Mail.Send' which doesn't exist on the resource '00000003-0000-0000-c000-000000000000'. Contact the app vendor.
I’ve tried various configurations but haven’t been able to resolve the issue. My question is: does the external company tenant require any specific configuration, or am I missing something on my end? How can I get this working for organizational accounts if it's already functioning for personal Microsoft accounts?
Any help or suggestions would be greatly appreciated.
Best regards, Ricardas Kauneckas