Open kimtth opened 3 months ago
@microsoft-github-policy-service agree
Sorry for typos.
# Fill in with your tenant id and org URL
organization_url = 'https://dev.azure.com/YOURORG'
_tenant_id= 'YOURORG_TENANT_ID'
# Create a connection to the org
credentials = InteractiveBrowserCredential(tenant_id=_tenant_id)
# The scope for the token should be 499b84ac-1321-427f-aa17-267ca6975798/.default which provides access to Azure DevOps Services REST API.
access_token = credentials.get_token("499b84ac-1321-427f-aa17-267ca6975798/.default")
token_auth = BasicTokenAuthentication({"access_token": access_token.token})
connection = Connection(base_url=organization_url, creds=token_auth)
Nice addition (can be considered part of SFI imo)
It doesn't support refreshing the access token and other related use cases. We need proper support of Azure Identity in Azure DevOps SDK.
Establish a connection using Browser Interactive mode