Sometimes, when you’re working with other developers, you might wonder who has changed some permissions on your Azure DevOps Services instance, or who has modified some pipeline, etc.

I’ve discovered that Azure DevOps Services has a builtin (but in preview) API to query audit log entries.

To be able to used it, you just need to perform a GET request to the following URL: https://auditservice.dev.azure.com/{organization}/_apis/audit/auditlog?api-version=5.1-preview.1 (of course, don’t forget to replace {organization} by the name of your organization).

The API is protected using a Basic authentication for which you’ll have to use: anything for the login and your PAT (Personal Access Token) for the password, as shown in the following image:

The query will then show you a list of the log entries available, with a lot of details for each:
– The person who performed the operation
– The category of the action
– The area of the action (Pipelines, Security, Permissions, etc.)
– And a lot of other things (like IP adress, timestamp and even more!)

Of course, if you need to filter, specify the batch size or get more results, there are some query parameters that you can use (and you can find all of them here:
https://docs.microsoft.com/en-us/rest/api/azure/devops/audit/audit%20log/query?view=azure-devops-rest-5.1). If needed, you can even download the logs using a dedicated endpoint:
https://docs.microsoft.com/en-us/rest/api/azure/devops/audit/download%20log/download%20log?view=azure-devops-rest-5.1

Using this service, you are now free to create your own dashboard that will help you to track (or to spy ^^) the actions performed on your Azure DevOps Services instance !

Happy coding !


Display debug layers on Xamarin.iOS Set Timezone on Azure App Service

Leave a Reply

Your email address will not be published. Required fields are marked *