function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
David Benkoel 3David Benkoel 3 

Revoke all access token issued by OAuth for a given user

Hi,

Suppose that a single user gets an access token via an OAuth 2.0 flow and by connecting to the same Connected App.

When he executes the flow from multiple devices / browsers / incognito tabs, I notice that Salesforce Identity issues multiple access tokens.

So, is there a way in Apex to know all the active access tokens issued to a given user?

The idea behind is to revoke them one by one.

Thanks
AnkaiahAnkaiah (Salesforce Developers) 
Hi David,

Refer the below article.
https://help.salesforce.com/s/articleView?id=sf.remoteaccess_revoke_token.htm&type=5 (https://help.salesforce.com/s/articleView?id=sf.remoteaccess_revoke_token.htm&type=5)

Thanks!!
David Benkoel 3David Benkoel 3
Hi Ankaiah,

Thank you for your answer, but it doesn't solve my question

My need is more about natively getting a list of access tokens issued for a given user, rather than having to store them programmatically one afther the other in whatever object.