How to write a python script to authenticate to Azure DevOps REST API and get the access token?
问题 How can I authenticate to Azure DevOps REST API in a python script? I found that there are 2 methods : Using personal access token (PAT) Using OAuth 2.0 I am using the second method. Followed the steps in this documentation: https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops I wrote this function to autherize to azure DevOps using OAuth 2.0: def get_authenticated(): client_id = < my client ID as a string > state = "user1" scope = "vso