Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

The result token's resource doesn't match resource sent to acquire_token_with_device_code #257

Answered by rayluo
jiasli asked this question in Q&A
Discussion options

You must be logged in to vote

The underlying Device Code Flow specs never defines a scope (or resource, for that matter) in the second leg. The ADAL Python's API surface happened to contain a resource parameter for the second step. That was a design mistake.

MSAL Python avoids this mistake by not accepting a scope parameter in the second step at all.

Thanks for reporting this. The workaround in ADAL Python is "do not use the resource parameter in the second step". And the better solution is to "migrate to MSAL Python", which Azure CLI will do soon. I'll still have to mark this as WontFix here.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rayluo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #255 on October 12, 2021 06:30.