Share via

Revoke access for application using node

Venisha Chauhan/Microsoft 1 Reputation point
2022-06-30T05:46:27.737+00:00

Hello guys,

I am developing a node application in which I need to access users' outlook calendar events. The main purpose of my application is that if the client allow access to their outlook calendar then my application will get all events of the outlook calendar and after some time if the client revokes access then my application should not able to access outlook calendar events.

Here I can able to gain access from users to access events via graph API, but I am not able to find any way to revoke the access.

I've tried below two APIs/method

/me/invalidateAllRefreshTokens
/me/revokeSignInSessions

But getting errors for both that :

No HTTP resource was found that matches the request URI 'https://outlook.office365.com:444/profile/v1.0/users('CID:xxxx....xxxx')/profile/revokeSignInSessions?api-version=AGSV1-internal'.

what is the reason for this error?

Also have one confusion related account types, I have 2 accounts:

  1. Create application and register under azure portal: Personal account
  2. Need to give access from application as client account: Personal account

have any suggestions where I should use work account and personal account to access api?

or is there any other way to revoke access or consent?

Microsoft Security | Microsoft Graph

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.