How to add service_hook(vso.service_hook) API Permission for accessing Azure Depops repo??

Vishal Pathriya 0 Reputation points
2025-06-18T09:57:54.1833333+00:00

I want to set webhook in Azure Repo for accessing PR and push data.
But i am not able to add vso.service_hook in API Permission, it show no result found when i searching hooks.

In the Officail Docs of Microsoft Scope Service Hooks in No longer public so how can i add webhook after oauth in Azure Devops Repos?

Azure DevOps
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Durga Reshma Malthi 4,165 Reputation points Microsoft External Staff Moderator
    2025-06-18T10:43:37.4566667+00:00

    Hi Vishal Pathriya

    Yes, Microsoft has deprecated public access to the vso.service_hook OAuth scope, which used to be required for programmatically managing service hooks (webhooks) in Azure DevOps. That’s why it no longer appears in the OAuth scope list when registering an app.

    You can Use the Azure DevOps UI for Setting Up Webhooks:

    1. Go to your Azure DevOps -> Select your Project -> Project Settings > Service Hooks -> + New subscription -> Select Web Hooks as the service -> Choose the trigger (e.g., Code pushed, pull request created) -> Select the Filters if required -> Configure the Action settings as required. User's image
    2. Refer to this document - https://learn.microsoft.com/en-us/azure/devops/service-hooks/services/webhooks?view=azure-devops
    3. This doesn’t require vso.service_hook scope and works seamlessly.

    Hope this helps!

    Please Let me know if you have any queries.

    If you found the information helpful, please click "Upvote" on the post to let us know and consider accepting the answer as the token of appreciation. Thank You.

    0 comments No comments

  2. Vishal Pathriya 0 Reputation points
    2025-06-18T10:52:57.33+00:00

    Hi @Durga Reshma Malthi ,

    We are using OAuth for getting users Token, and this token not allow us to create a webhook.

    0 comments No comments

  3. Durga Reshma Malthi 4,165 Reputation points Microsoft External Staff Moderator
    2025-06-18T11:40:38.98+00:00

    Hi Vishal Pathriya

    OAuth access tokens currently cannot be used to manage service hooks, because Microsoft has made the vso.service_hook scope private/internal. That’s why your token lacks the necessary permission to create or manage webhooks.

    Refer to this document - https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops#scopes

    Hope this helps!

    Please Let me know if you have any queries.

    If you found the information helpful, please click "Upvote" on the post to let us know and consider accepting the answer as the token of appreciation. Thank You.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.