Skype for Business Web SDK を使用してアプリを作成しようとしています。
ログインコードの一部は次のとおりです。
var config = {
apiKey: 'a42fcebd-5b43-4b89-a065-74450fb91255', // SDK
apiKeyCC: '9c967f6b-a846-4df2-b43d-5167e47d81e1' // SDK+UI
};
var Skype;
var app;
console.log(Skype);
Skype.initialize({ apiKey: config.apiKey }, function(api) {
window.skypeWebAppCtor = api.application;
window.skypeWebApp = new api.application();
Application = api.application;
app = new Application();
console.log("app", app);
skypeSignIn();
window.skypeWebApp.signInManager.state.changed(function(state) {
console.log("in",state);
});
}, function(err) {
console.log(err);
console.log("cannot load the SDK");
});
var skypeSignIn = function() {
app.signInManager.signIn({
"client_id": "my-GUID", // GUID obtained from Azure app registration.
"origins": ["https://webdir.online.lync.com/autodiscover/autodiscoverservice.svc/root"],
"cors": true,
"redirect_uri": 'https://freshservice.com',
"version": 'freshservice skype for business integration'
}).then(function() {
alert('Logged in!');
});
上記のコードを試すと、元の URL でエラー 401 が発生します -
GET https://webdirin1.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user 401 (Unauthorized)
これはどのように修正できますか?