Share via

Azure DevOps Authorizations

Mike Schuman 1 Reputation point
2025-05-09T09:39:08.1133333+00:00

I have added an authorization to Azure DevOps...easy

I now want to Revoke the authorization. When clicking on Revoke, nothing happens (no error, no indication of any action).

What is the next step?

Azure DevOps
0 comments No comments

5 answers

Sort by: Most helpful
  1. Durga Reshma Malthi 11,595 Reputation points Microsoft External Staff Moderator
    2025-05-14T08:59:07.2433333+00:00

    Hi Mike Schuman

    Did you try using the PowerShell script mentioned above? Could you please check the below steps to resolve this issue:

    1. Please check if you are part of Project Administrator or Contributor to revoke the authorizations.
    2. Try logging out and logging back into the account.
    3. You could also try a hard refresh (Ctrl + Shift + R or Cmd + Shift + R) to force the UI to update.
    4. Consider checking for any browser extensions that might interfere. Open Developer Tools (F12) -> Console tab and watch for any errors when clicking Revoke. That could indicate a UI bug or permissions issue.
    5. If you're still having trouble with curl, try using Postman or another API client to make the request by following this wiki - Revoke Authorizations
    6. You can check this via below cmds:
         GET https://vssps.dev.azure.com/{organization}/_apis/TokenAdmin/Authorizations?api-version=7.1-preview.1
      
      This will list all authorizations and verify whether the one you tried to revoke still exists. You can also delete one explicitly using:
         DELETE https://vssps.dev.azure.com/{organization}/_apis/TokenAdmin/Authorizations/{authorizationId}?api-version=7.1-preview.1
      

    Hope this helps!

    Please Let me know if you have any queries.

    Was this answer helpful?

    0 comments No comments

  2. Mike Schuman 1 Reputation point
    2025-05-13T22:38:01.6733333+00:00

    After using the curl, I received the following error: The controller for path '/_apis/tokenadmin/tokens' was not found or does not implement IController.

    Invoke-RestMethod:

    The controller for path '/_apis/tokenadmin/tokens' was not found or does not implement IController.
    
    html {
    
    height: 100%;
    

    }

    body {

    font-family: "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Ubuntu, Arial, sans-serif, "Apple Color Emoji",
    
        "Segoe UI Emoji", "Segoe UI Symbol";
    
    font-size: 14px;
    
    height: 100%;
    
    margin: 0;
    
    background-color: #fff;
    

    }

    .container {

    height: 100%;
    
    display: flex;
    
    flex-grow: 1;
    
    flex-direction: column;
    

    }

    .header {

    font-size: 14px;
    
    line-height: 20px;
    
    padding-right: 40px;
    
    display: flex;
    
    box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.08);
    

    }

    .header > div,

    .header > a {

    margin: 14px 0px 14px 32px;
    
    text-decoration: none;
    
    color: rgba(0, 0, 0, 0.55);
    

    }

    .header > div:first-child {

    flex-grow: 1;
    
    margin-left: 14px;
    
    color: #0078d4;
    
    display: flex;
    

    }

    .header > div:first-child > div {

    margin-left: 14px;
    

    }

    .content-container {

    display: flex;
    
    flex-direction: column;
    
    justify-content: center;
    
    margin-top: 126px;
    

    }

    .content {

    display: flex;
    
    justify-content: center;
    
    align-items: center;
    

    }

    .error-info {

    display: flex;
    
    flex-direction: column;
    
    width: 500px;
    

    }

    .title {

    font-size: 28px;
    
    font-weight: bold;
    
    line-height: 40px;
    
    letter-spacing: -0.04em;
    
    color: #212121;
    
    margin-bottom: 16px;
    

    }

    .details {

    font-size: 14px;
    
    line-height: 20px;
    
    color: #212121;
    
    margin-bottom: 16px;
    

    }

    .details a {

    text-decoration: none;
    
    color: #0078d4;
    

    }

    .reference-data {

    font-size: 12px;
    
    line-height: 16px;
    
    color: rgba(0, 0, 0, 0.55);
    
    margin-bottom: 32px;
    

    }

    .logo {

    height: 500px;
    
    width: 500px;
    

    }

    .action-container {

    display: flex;
    

    }

    .action {

    background-color: #0078d4;
    
    color: #ffffff;
    
    align-items: center;
    
    border-radius: 2px;
    
    border: 1px solid transparent;
    
    cursor: pointer;
    
    display: inline-flex;
    
    flex-direction: row;
    
    flex-shrink: 0;
    
    font-family: inherit;
    
    font-size: inherit;
    
    font-weight: 600;
    
    justify-content: center;
    
    outline: none;
    
    overflow: visible;
    
    padding: 6px 12px;
    
    position: relative;
    
    transition: background 80ms linear;
    
    text-decoration: none;
    

    }

    .action:focus {

    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.35);
    

    }

    .action:hover {

    background-color: rgb(0, 103, 181)
    

    }

    .action:active {

    background-color: rgb(0, 91, 161)
    

    }

    .secondary-action {

    text-decoration: none;
    
    color: #0078d4;
    
    margin-top: 16px;
    

    }

    .more-info {

    margin: auto;
    
    display: flex;
    
    flex-direction: column;
    
    padding: 0 40px;
    

    }

    .more-info > div:first-child {

    font-size: 15px;
    
    font-weight: 700;
    

    }

          Azure DevOps
    
        
    
        Service Status
    
        Support
    
        @AzureDevOps
    
      
    
      
    
        
    
          
    
            
    
          
    
          
    
            404 - Page not found
    
            Looks like this page doesn't exist or can't be found. Make sure the URL is correct.
    
            
    
              5/13/2025 10:40:51 PM (UTC)
    
              7da473db-ac4a-456c-b8db-039ebf3e789e
    
            
    
            
    
              
    
                Go back home
    
              
    
            
    

    Was this answer helpful?

    0 comments No comments

  3. Durga Reshma Malthi 11,595 Reputation points Microsoft External Staff Moderator
    2025-05-12T07:00:58.35+00:00

    Hi Mike Schuman

    Could you please try revoking via Rest API:

    1. If the UI isn't working, then generate a personal access token by navigating to Azure DevOps -> User Settings -> Personal Access tokens -> Create token with Full Access or at least Token Administration permissions.
    2. To revoke an authorization, you need the authorization ID. You can retrieve it using the following API call:
         curl -u USERNAME:PAT -X GET "https://vssps.dev.azure.com/{organization}/_apis/tokenadmin/tokens?api-version=7.1-preview.1"
      
      or you can try to run the below script in PowerShell
         $organization = ""
         $pat = ""
         # Encode PAT for authentication
         $authHeader = @{
             Authorization = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$pat"))
         }
         # Define the API URL
         $url = "https://dev.azure.com/$organization/_apis/tokenadmin/tokens?api-version=7.1-preview.1"
         # Make the API request
         $response = Invoke-RestMethod -Uri $url -Headers $authHeader -Method Get
         # Output the response
         $response
      
      Replace: {organization} with your Azure DevOps organization name. USERNAME:PAT with your Azure DevOps username and Personal Access Token. This will return a list of tokens, including their authorization ID.
    3. Once you have the authorization ID, send a POST request to revoke it:
         curl -u USERNAME:PAT -X POST "https://vssps.dev.azure.com/{organization}/_apis/tokenadmin/revocations?api-version=7.1-preview.1" \
            -H "Content-Type: application/json" \
            -d '{
                  "authorizationId": "{AUTHORIZATION_ID}"
                }'
      
      (or)
         $organization = "your-organization"
         $pat = "your-personal-access-token"
         $authorizationId = "your-authorization-id"
         # Encode PAT for authentication
         $authHeader = @{
             Authorization = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$pat"))
         }
         # Define the API URL for revocation
         $url = "https://vssps.dev.azure.com/$organization/_apis/tokenadmin/revocations?api-version=7.1-preview.1"
         # Define the request body
         $body = @{
             authorizationId = $authorizationId
         } | ConvertTo-Json
         # Make the API request to revoke the token
         $response = Invoke-RestMethod -Uri $url -Headers $authHeader -Method Post -Body $body -ContentType "application/json"
         # Output the response
         $response
      
    4. After running the request, check if the authorization has been removed by listing the tokens:
         curl -u USERNAME:PAT -X GET "https://vssps.dev.azure.com/{organization}/_apis/tokenadmin/tokens?api-version=7.1-preview.1"
      

    You can refer to this doc: Azure DevOps Rest API for detailed steps.

    Hope this helps!

    Please Let me know if you have any queries.

    Was this answer helpful?

    0 comments No comments

  4. Mike Schuman 1 Reputation point
    2025-05-12T03:59:58.89+00:00

    Thanks for your response. I can confirm that I am trying to revoke an authorization. I have previously tried all of the steps you mentioned.

    The issue is that the Revoke button does not appear to be clickable on the page. When observing from the console there is a successful query and then a 204 response from the portal. On screen, I see no activity at all and the authorization remains.

    Was this answer helpful?


  5. Durga Reshma Malthi 11,595 Reputation points Microsoft External Staff Moderator
    2025-05-09T11:56:55.9366667+00:00

    Hi Mike Schuman

    I believe you are trying to revoke authorization from Authorized OAuth Apps.

    User's image

    Could you please follow the below troubleshooting steps to resolve this issue:

    1. Clear your browser cache and cookies and then try to revoke the authorization again.
    2. Try using a different browser or in incognito mode.
    3. Ensure you're a Project Collection Administrator or have appropriate access rights.
    4. If the authorization is based on Microsoft Entra ID, then remove it from the Azure portal.

    If the authorization involves PAT Token, then please follow the steps mentioned in this document - Revoke PATs

    Additional References:

    1. Manage Authorizations
    2. Developer Community Answer

    Hope this helps!

    Please Let me know if you have any queries.

    Was this answer helpful?

    0 comments No comments

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.