azure-devops-dotnet-samples
azure-devops-dotnet-samples copied to clipboard
Added sample for token administration
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
If this is still relevant, can you retarget it to main?