Azure / Azure/azure-rest-api-specs

Problem generating bearer token using APIs

Open
#10,741 1 comment 0 reactions 0 assignees View on GitHub
AAD customer-reported needs-team-attention question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

![image](https://user-images.githubusercontent.com/29769158/92598884-156b7900-f2c7-11ea-9cfc-de71eae395de.png)

how to generate this bearer token (highlighted) programmatically using APIs?
authority_url = 'https://login.microsoftonline.com/' + TENANT_ID
context = adal.AuthenticationContext(authority_url)
Using the ADAL module in python it returns an access token but it does not work, while the one generated in the image on Microsoft docs pages works perfectly fine.
Can someone help me understand, how it works??

Contributor guide

Open the contributing guide

Research direction

No repository file or test is named. Start by reproducing the ADAL AuthenticationContext flow with the authority_url shown, then compare its access token with the bearer token in the linked Microsoft documentation image and identify the target API or resource each token addresses. Done means explaining the mismatch and confirming a token that works against the same API.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.