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

Oaut2 web Apps and graph.windows.net

$
0
0

Hi again ,

Still have som some struggling with Oauth2, but the login is now working :-)

I have a webApps on azure for SSO , its working.

https://login.microsoftonline.com/...myAD../oauth2/authorize?response_type=code&client_id=29469e22-.....

In respond I get code=AAABAAAAiL9Kn2Z27UubvWFPbm0gLSbzndDK-8I2AjOT74lLi-3LrTAURy1QImVjJPLRuWS9_Kz7BJES8qOYXIGk_LF4WwqOi74WpMxGKOH7rsdCUy38oECTMAmq9GWwqI3pA3SVYaDkTHmUNv-EZ3PDjMgOXMUdJSv6Sz9AuLndycEb-VjOfw0SeBb3ZrRb.....

I post to this URL  : https://login.microsoftonline.com/760f555d-..."removed"/oauth2/token

with this parameter:

  • grant_type=authorization_code
  • code = AAABDtO0Ji5TooHbTpAjiUIAA..."removed"
  • client_id= 29469e22-.......
  • resource= https://graph.windows.net
  • client_secret = mKl……

I receive  access key

Access token :

eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL2dyYXBoLndpbmRvd3MubmV0IiwiaXNzIjoiaHR0…..

So far so good  :-)

Now I try to list users in my AD using the access token with this URL

GET

https://graph.windows.net/760f555d-….. removed…/users

parameter:  api-version=1.5

Header :   Authorization= 

 Bearer eyJ0eXAiOiJKV1Q……………

getting this error

{

  "odata.error":

  {

    "code":"Authentication_MissingOrMalformed",

    "message":

    {

      "lang":"en",

      "value":"Access Token missing or malformed."

    }

Any idea what I am doing wrong here ??



Viewing all articles
Browse latest Browse all 16000

Trending Articles



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