question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get access token version 2 for Graph API

See original GitHub issue

Library

  • `@azure/msal-angularjs@0.1.1

Description

After authenticating the user in https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/authorize?, our application is using ‘msalAuthenticationService.acquireTokenSilent’ to acquire access token that we will use to call MS Graph APIs. We’re expecting to get access token ver. 2 however, per checking in token payload it has “ver”: "1.0 value.

Is there are a way to configure MSAL to get access token v2 from Microsoft Identity Platform?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jasonnuttercommented, Jun 5, 2020

@patatas Sorry, I misread your original question. MSAL uses the v2 endpoint, which is capable of return v2 and v1 tokens. You can control which version is return by editing the manifest and setting accessTokenAcceptedVersion: https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-app-manifest#manifest-reference

0reactions
patatascommented, Jun 5, 2020

Great! that’s exactly what I’m looking for. Thanks @jasonnutter

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get access on behalf of a user - Microsoft Graph
1. Register your app · 2. Get authorization · 3. Get a token · 4. Use the access token to call Microsoft Graph...
Read more >
Getting Access Token for Microsoft Graph Using OAuth REST ...
Microsoft Graph API uses Bearer Authentication in order to validate the request, which means it expects to receive an authorization token ( ...
Read more >
Get Access Token for Graph API - Dynamics 365 Community
Step 1: Register App in Azure App Registration · Step 2 : Get Client Secret and Client Id from App Registered · Step...
Read more >
Getting started with Microsoft Graph - part 2
To make a request to Microsoft Graph you are required to have an access token that you have received from the Microsoft Identity...
Read more >
Access Token Guide - Facebook Login
To obtain a page access token you need to start by obtaining a user access token and asking for the Page permission or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found