Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

querying graph api results in Authentication_MissingOrMalformed

$
0
0

Hi,

I've created an application within azure ad and gave it the permission to access the graph api. Then I fetched an access_token from its oauth2.0-endpoints and tryed to use it, to query the graph api. but this results in a 401 with the error-code Authentication_MissingOrMalformed.

I place the HTTP-calls below.

What's wrong here?

Wishes

Manfred

8<--------

1) Access auth-endpoint

https://login.windows.net/1915cf7e-066e-437f-9e2e-414bb419e2cf/oauth2/authorize?api-version=1.0&response_type=code&client_id=694199a6-bcd9-4d77-a8f4-85e4579b711a&state=xyz&redirect_uri=http%3A%2F%2Flocalhost%3A6980%2Fcallback&resource=https%3A%2F%2Fgraph.windows.net

2) Exchange access-code for access_token

POST https://login.windows.net/1915cf7e-066e-437f-9e2e-414bb419e2cf/oauth2/token
Content-Type
: application/x-www-form-urlencoded

grant_type=authorization_code&redirect_uri=http%3A%2F%2Flocalhost%3A6980%2Fcallback&client_id=694199a6-bcd9-4d77-a8f4-85e4579b711a&client_secret=Um%2BZepYvg5cf%2Bmc%2FNf92%2BmT4HEAFJ2b0wocCPPN56ik%3D&resource=https%3A%2F%2Fgraph.windows.net&code=AwABAAAAvPM1...

3) Using the access_code to quey graph api for current user

GET https://graph.windows.net/1915cf7e-066e-437f-9e2e-414bb419e2cf/me?api-version=2013-11-08

User-Agent: Fiddler
Host: graph.windows.net
Content-Length: 0
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJ...


Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>