0

After logging in to my office-365 account in my iOS app, it generates an oauth token.

How do I validate this token in the backend with microsoft?

..With Google, when the client gets the oauth token, they have an SDK to pass that token to your own backend where you can validate. Is there something similar w/ MS?

edit

Looks like I'll just use that token and verify the user: https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_service

https://graph.microsoft.com/v1.0/users/

Tim Nuwin
  • 2,775
  • 2
  • 29
  • 63

1 Answers1

0

You can try the code below to authenticate a user with an identity token for Exchange:

{ 
"aud" : "https://mailhost.contoso.com/IdentityTest.html",
"iss" : "00000002-0000-0ff1-ce00-000000000000@mailhost.contoso.com",
"nbf" : "1505749527",
"exp" : "1505778327",
"appctxsender":"00000002-0000-0ff1-ce00-000000000000@mailhost.context.com",
"isbrowserhostedapp":"true",
"appctx" : {
    "msexchuid" : "53e925fa-76ba-45e1-be0f-4ef08b59d389",
    "version" : "ExIdTok.V1",
    "amurl" : "https://mailhost.contoso.com:443/autodiscover/metadata/json/1"
    } 
}

For more information, please review the following links:

How to validate Microsoft Graph API jwt access_token and secure your API?

Authenticate a user with an identity token for Exchange

Yuki
  • 212
  • 1
  • 4