I am getting Unauthorised error without reason while subscribing to email notification using graph API
We're developing an application that needs to read clients' Outlook emails for internal use. We've created an application in Azure AD and configured all required permissions to fetch emails and receive notifications.
Our implementation uses client credentials flow (not OAuth), passing secrets, tokens, tenantId, and clientId to call the Graph API. We successfully tested this with our personal Azure accounts - we're able to receive notifications when emails arrive in the subscribed inbox and also fetch emails.
However, after migrating to our enterprise Azure account for company use, the same code is failing with authorization errors specifically when calling the create subscription API though I am able to fetch all the users in my enterprise app with the same token but could not create subscriptions for them.