Created
November 20, 2016 17:37
-
-
Save paulryan/f7bda1a15e6f39039a8ca5ab24bb923d to your computer and use it in GitHub Desktop.
Usage of OAuth implict flow lib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var aadAppClientId = "8BE5AA0E-F900-4BDF-A7CF-71B3CC53B78E"; | |
var resource = "https://graph.microsoft.com" | |
var query = "/v1.0/me/events"; | |
var tokenFactory = new CC.CORE.Adal.AppTokenFactory(aadAppClientId, resource); | |
tokenFactory.ExecuteQuery(query) | |
.done(function (response) { | |
// Success! | |
}) | |
.fail(function (response) { | |
// NOTE: Provide a link to renew an expired or yet to be approved session: | |
// "Sorry, your session has expired or requires your approval. | |
// <div><a href='" + response.authorizeUrl + "'>Click here to sign in</a></div>"; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment