Forum Discussion

SaraM123's avatar
SaraM123
Copper Contributor
Aug 20, 2023

Project service hooks registrations with OAuth 2.0

Hi, there is any way to register project webhooks using REST APIs with OAuth 2.0 scope permissions when the authenticated user is without admin permissions?

Create Subscriptions API:

https://learn.microsoft.com/en-us/rest/api/azure/devops/hooks/subscriptions/create?view=azure-devops-rest-7.0&tabs=HTTP

1 Reply

  • Consider below for non-admin users can do:


    1.     Delegate via a Service Principal
    Use a service account or Azure AD app registration with elevated permissions to create subscriptions on behalf of users.
    2.     Custom Middleware
    Build a backend service that receives user requests and creates subscriptions using a privileged token.
    3.     Permission Elevation
    Grant the user temporary access to the required permissions via a custom security group in Azure DevOps.

Resources