azure-devops-dotnet-samples icon indicating copy to clipboard operation
azure-devops-dotnet-samples copied to clipboard

Added sample for token administration

Open kigunda opened this issue 7 years ago • 2 comments

The TokenAdmin sample shows organization administrators how they can use the VSTS REST APIs to find and revoke personal access tokens (PATs) for users in their organization. It also shows how to create revocation rules that prevent access through other OAuth credentials, such as self-describing session tokens. The sample is written using our C# client libraries, but is commented with the HTTP calls that administrators can make to perform these same operations directly over the wire.

The methods in this sample, and the endpoints they cover are:

  • GetPersonalAccessTokenDetailsForUsersInYourOrganization GET /_apis/tokenAdmin/personalAccessTokens/{subjectDescriptor}

  • RevokePersonalAccessTokensForUsersInYourOrganization POST /_apis/tokenAdmin/revocations

  • RevokeSelfDescribingSessionTokensForUsersInYourOrganization POST /_apis/tokenAdmin/revocationRules

kigunda avatar Jul 19 '18 03:07 kigunda

CLA assistant check
All CLA requirements met.

msftclas avatar Jul 19 '18 03:07 msftclas

If this is still relevant, can you retarget it to main?

vtbassmatt avatar Jun 22 '20 17:06 vtbassmatt