I have a request url which i need to call to get an access token from the response.
https://login.microsoftonline.com/<my tenant id>/oauth2/v2.0/authorize?
client_id=<my client id>
&response_type=token
&redirect_uri=https%3A%2F%2Flocalhost%3A7070
&scope=https%3A%2F%2Fgraph.microsoft.com%2Fuser.read
&response_mode=fragment
&state=12345
&nonce=678910
&prompt=none
&login_hint=<my email>
Now I tried requesting this in 2 different ways: thru the browser and thru javascript.
Option A (thru browser)
This gives me a proper access token which i can verify using an online token validation tool such as, enter link description here
OptionB (thru javascript)
For this i simply call this:
window.location.assign(url)
This gives me a response, the returned access token is about half the visible size of option A. Plus, this access token does not appear to be valid.
Question: Why does option B give me an invalid access token?