Tag: office365api

无法从oauth2 office365日历API获取令牌

我无法从office365日历API获得令牌,从最近7到8个月,它正在工作,但突然间我得到错误“期待一个数组或一个可迭代的对象,但得到[对象为空]”。 你们可以在这里看到我的代码 var oauth2 = require("simple-oauth2")(ConfigOutlookCredentials); var scopes = ["openid","offline_access","profile", //here 'profile' is added bz not able to getting EmailId in this function getEmailFromIdToken. "https://outlook.office.com/mail.read", "https://outlook.office.com/calendars.readwrite" ]; function getTokenFromCode(auth_code,callback) { logger.MessageQueueLog.log("info","auth_code: "+auth_code+" || redirectUri: "+redirectUri+" || scopes: "+scopes); oauth2.authCode.getToken({ code: auth_code, redirect_uri: redirectUri, scope: scopes.join(" ") }, function(error, result) { logger.MessageQueueLog.log("info","error: "+util.format('%j',error.message)+" || result: "+util.format('%j',result)); […]