Showing results for 
Search instead for 
Did you mean: 
New Member

oauth2 implicit flow returning an invalid token

I want to get outlook contacts into my ionic/angular web app. I'm trying to get the access token for microsoft api using implicit flow in order to access user's contacts. I've tried the following so far :


use this url to get access token in the url parameter from redirect (after user login)



+"client_id={CLIENT_ID_HERE}" +"&response_type=token"


+"&scope=offline_access openid"

+"&nonce=89289"//tried both with and without this



I get an access token in the redirect url, but its actually invalid, eg :



Community Support
Community Support

Hi @sdnwkjd ,

Could you please share a bit more about your scenario?

Do you want to get the Access Token from the URL that you specified?


Based on the URL that you mentioned, I think it is used to get authorization code rather than Access Token. If you want to get Access Token from Microsoft identity platform, you need to send a POST Reuqest to the /token endpoint as below (rather than  /authorize endpoint):

POST /{tenant}/oauth2/v2.0/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded

&client_secret=JqQX2PNo9bpM0uEihUPzyrh    // NOTE: Only required for web apps


More details about getting Access Token from Microsoft identity platform, please check the following article:


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft I'm trying to use implicit flow to get the access token. If you look at implicit flow, you'll notice the url is correct. However, its returning an invalid token and i'm not sure how to solve that. 


Note : I'm using this from an ionic/angular app so the /token endpoint gives a cors error. Thats the reason i'm using implicit flow.


Sorry for the late response (thought I was supposed to receive email whenever theres an update to this post)

I'm using the docs here


but I'm still getting invalid token

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

MPP IDEAS updated 768x460.png


Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Top Solution Authors
Users online (4,381)