Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #503

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Update README.md #503

wants to merge 1 commit into from

Conversation

kimtth
Copy link

@kimtth kimtth commented Jul 31, 2024

Establish a connection using Browser Interactive mode

@kimtth
Copy link
Author

kimtth commented Jul 31, 2024

@microsoft-github-policy-service agree

@kimtth
Copy link
Author

kimtth commented Aug 1, 2024

Sorry for typos.

  1. tenant_id=tenant_id -> tenant_id=_tenant_id
  2. "access_token": access_token -> "access_token": access_token.token
# 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)

@JF6
Copy link

JF6 commented Aug 1, 2024

Nice addition (can be considered part of SFI imo)

@vs4vijay
Copy link
Member

It doesn't support refreshing the access token and other related use cases. We need proper support of Azure Identity in Azure DevOps SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants