Hello @Gabriel Pillay
Thanks for reaching out!
Based on my research on this issue, there could be multiple reasons you are facing this error.
- Generally, error AADSTS50020 comes when a user is not authorized to call an endpoint. Make sure to use right auth token with right permissions (Please note that Calendars.ReadWrite.Shared is a Delegated permission). Refer this Permissions document to know more about it.
- You're trying to login to an application in your tenant with a user account which is not a part of your tenant. In this case, user account needs to be added as an external user in the tenant first. Refer this documentation to know more on this.
To add guest users to an application, follow this document.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.