Persistent 401 error with no explanation

Chase Catalano 25 Reputation points
2025-11-22T23:09:57.8166667+00:00

As far as I can tell I've set everything up correctly regarding my tenant and app registration. All I'm trying to do is allow users to integrate their outlook calendar with my website. I've gotten as far as successfully authenticating users and retrieving an auth code, and exchanging the auth code for access/refresh tokens. I've even successfully implemented a cron job to automatically refresh tokens before they expire. Now I'm trying to get the authenticated users calendar events and I'm constantly getting a 401 error and can't for the life of me figure out why. Has anyone else experienced this? Here is the request/response that I'm getting. I've tested in graph explorer (which has a default token instead of letting me use the token i generated) and it works fine.

Microsoft Security | Microsoft Entra | Microsoft Entra ID

Answer accepted by question author
Sridevi Machavarapu 33,820 Reputation points Microsoft External Staff Moderator
2025-11-24T02:11:42.5733333+00:00

Hello Chase Catalano,

To access personal Outlook calendar events, you must create app registration with supported account type as "Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g., Skype, Xbox)" like this:

User's image

In such scenarios, you must use /common endpoint that allow user to sign in with their personal Outlook credentials. Refer this MS Document.

User's image

If you use tenantId instead of /common while logging in with personal Outlook account, it will throw 401 error.

Glad to know issue is resolved after changing to /common. Please let me know if you have further queries on this.

If this answers your query, do click Accept Answer and Yes for was this answer helpful, which may help members with similar questions

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.