I am trying to access Microsoft Graph Api for my OneDrive Business account. I have created an app in Azure Directory. I am able to authenticate, I am getting an access token but when trying to use that access token and use this api https://graph.microsoft.com/v1.0/me. I am getting this error : "Access token validation failure. Invalid audience." I dont know if I am missing any permission to access Graph APi?
Not able to access Microsoft Graph Api using OAuth Access token
1k views Asked by Vishesh Aalwani At
1
There are 1 answers
Related Questions in OAUTH
- How do i implement a live clock?
- Destroy an object in a Volt store collection
- Is there a way to access each user account in Volt?
- How to integrate other javascript library in Volt framework?
- How to flag a Volt user with is admin role?
- How do I do a jQuery toggleClass in Volt?
- What does the exception "ArgumentError: a promise has already been chained" mean, and how do I debug it?
- Changing <head> ection with Volt
- Volt Framework integration test with Phantom not populating page with objects in store
- How to edit objects in Volt framework 0.9.3?
Related Questions in AZURE-ACTIVE-DIRECTORY
- How do i implement a live clock?
- Destroy an object in a Volt store collection
- Is there a way to access each user account in Volt?
- How to integrate other javascript library in Volt framework?
- How to flag a Volt user with is admin role?
- How do I do a jQuery toggleClass in Volt?
- What does the exception "ArgumentError: a promise has already been chained" mean, and how do I debug it?
- Changing <head> ection with Volt
- Volt Framework integration test with Phantom not populating page with objects in store
- How to edit objects in Volt framework 0.9.3?
Related Questions in MICROSOFT-GRAPH-API
- How do i implement a live clock?
- Destroy an object in a Volt store collection
- Is there a way to access each user account in Volt?
- How to integrate other javascript library in Volt framework?
- How to flag a Volt user with is admin role?
- How do I do a jQuery toggleClass in Volt?
- What does the exception "ArgumentError: a promise has already been chained" mean, and how do I debug it?
- Changing <head> ection with Volt
- Volt Framework integration test with Phantom not populating page with objects in store
- How to edit objects in Volt framework 0.9.3?
Related Questions in ACCESS-TOKEN
- How do i implement a live clock?
- Destroy an object in a Volt store collection
- Is there a way to access each user account in Volt?
- How to integrate other javascript library in Volt framework?
- How to flag a Volt user with is admin role?
- How do I do a jQuery toggleClass in Volt?
- What does the exception "ArgumentError: a promise has already been chained" mean, and how do I debug it?
- Changing <head> ection with Volt
- Volt Framework integration test with Phantom not populating page with objects in store
- How to edit objects in Volt framework 0.9.3?
Related Questions in ONEDRIVE
- How do i implement a live clock?
- Destroy an object in a Volt store collection
- Is there a way to access each user account in Volt?
- How to integrate other javascript library in Volt framework?
- How to flag a Volt user with is admin role?
- How do I do a jQuery toggleClass in Volt?
- What does the exception "ArgumentError: a promise has already been chained" mean, and how do I debug it?
- Changing <head> ection with Volt
- Volt Framework integration test with Phantom not populating page with objects in store
- How to edit objects in Volt framework 0.9.3?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
According to Resolve Microsoft Graph authorization errors - Microsoft Graph | Microsoft Docs
As your error message says, your token audience is invalid ,you must have set wrong scope when requesting the token.Please check the aud claim as commented in https://jwt.ms . Try to set the scope to
https://graph.microsoft.com/.default
in authentication request and givedelegated
andapplication permissions
under Microsoft apis> Microsoft graph andgrant admin consent
to the api. etc . The api call only supports delegated permissions, so you can't use the client credential flow to get the token. For the /me endpoint, the user needs to log in, so you need Use auth code flow to obtain an access token. Calling /me end point requires delegated permissions.And calling one drive api from that also requires another additional permissions for different activity.
You can make use of Graph Explorerto see the permissions required and according grant admin consent for the same through explorer itself or through portal.
If still error remains , please change the accesstokenacceptedversion to 2 if it is null or 1 or vice versa. And try again.