var clientId = 'xxxxxxx';
var replyUrl = 'http://localhost:55452/HTML/Dashboard.html';
var authServer = 'https://login.windows.net/common/oauth2/authorize?';
var responseType = 'token';
var Office365Login = authServer + "response_type=" + responseType + "&" + "client_id=" + clientId + "&" + "resource=" + resource + "&" + "redirect_uri=" + replyUrl;
我可以接收访问令牌以及重定向网址。现在使用访问令牌如何访问姓名,电子邮件ID等用户信息?我需要向哪个URL发出Ajax请求并获取信息?
答案 0 :(得分:0)
更新了网址配置:
var clientId = 'xxxxxxx';
var replyUrl = 'http://localhost:55452/HTML/Dashboard.html';
var authServer = 'https://login.windows.net/common/oauth2/authorize?';
var responseType = 'token';
var resource = "https://graph.microsoft.com";
var Office365Login = authServer + "response_type=" + responseType + "&" + "client_id=" + clientId + "&" + "resource=" + resource + "&" + "redirect_uri=" + replyUrl;