ROADtools icon indicating copy to clipboard operation
ROADtools copied to clipboard

Problem requesting access token for certain clients

Open HackmichNet opened this issue 1 year ago • 1 comments

When using the following command with a valid refresh token:

roadrecon auth --refresh-token "XXXX" -s "https://graph.windows.net/.default openid profile offline_access" -c c44b4083-3bb0-49c1-b47d-974e53cbdf3c

The server response with:

"AADSTS9002327: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests."

I debuged the issue and found out the problem is the user agent. After setting it to a browser like value, the call works as expected. Maybe it is possible to add a parameter for the user agent.

HackmichNet avatar Nov 03 '23 13:11 HackmichNet

Interesting. Adding custom user agent support is on my short term to-do list. I did make some changes recently to support the scope parameter with the auth, which apparently triggers this new behaviour, will have to look at a fix for that.

dirkjanm avatar Nov 07 '23 20:11 dirkjanm