In our APP we have the user token for a user on Azure DevOps. We use this to perform certain actions in the Azure DevOps instance using REST APIs. In order to ignore webhooks triggered by actions performed by this particular user, we need to know the user's email. Is there an API that can provide that?
I tried the GET https://app.vssps.visualstudio.com/_apis/profile/profiles/{id}?api-version=5.1 with "me" in place of {id} as suggested by their documentation https://learn.microsoft.com/en-us/rest/api/azure/devops/profile/profiles/get?view=azure-devops-rest-5.1 but it throws "Resource cannot be found" error.
The post is quite a time ago, but maybe my answer will help some other peoples. The docs are a bit confusing here. This url can be used:
https://vssps.dev.azure.com/{{organization}}/_apis/profile/profiles/me
I tested it successfully with a PAT (Secret of Basic Auth, Username empty).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With