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
Developer BaseDeveloper Base 

OAuth mass revoke - POST request

Hello,

my org has about 40 users that I need to log out from their applications. This means that I need to revoke all their OAuth connections:

User-added image
There are about 120 connections to revoke. I can not do that manually, it would take too much time. According to documentation, I can make a Post request to revoke an OAuth connection:

https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/oauth_revoking_tokens.htm

I managed to obtain all the OAuth ids, but how do I now make a POST callout according to the documentation to delete them all? Could anyone give me a sample code? This would really help. Thanks.
VinayVinay (Salesforce Developers) 
Check below article that has details on how to Revoke OAuth Tokens.

https://help.salesforce.com/articleView?id=sf.remoteaccess_revoke_token.htm&type=5

Reference:
https://salesforce.stackexchange.com/questions/177498/how-can-i-revoke-all-oauth-tokens-for-a-single-user

Hope this helps...

Thanks,
Developer BaseDeveloper Base
Hi,

the first link you posted is the same link that was posted by me.

The second link does not help either since I need to write the code for the POST callout.