簡體   English   中英

在Office.js任務窗格中確定用戶是Windows Live還是Office 365用戶?

[英]Determining whether the user is Windows Live or Office 365 User in a Office.js Task Pane?

鑒於Live和O365的OAuth URL是不同的**(希望我一開始就是對的),有沒有辦法知道當前用戶是否正在運行Live Office Pane加載項ID或Office 365 ID?

我們目前使用兩個按鈕供用戶登錄:一個用於“使用Windows Live登錄”,另一個用於“使用Office 365登錄”,用於啟動相應的OAuth步驟。 我們想要這樣做只有一個登錄按鈕,它將預設為當前登錄的用戶類型。

您將需要查看Azure AD融合身份驗證。 這是討論各種方法的文章https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview/

這是一篇博客文章,內容相同: https//blogs.msdn.microsoft.com/richard_dizeregas_blog/2015/09/04/working-with-the-converged-azure-ad-v2-app-model/

融合的auth支持implict grant,這是任務窗格Add-in的理想選擇

此外,我們正在構建一個auth幫助程序,以幫助您輕松地在任務窗格中實現相同的功能。 我會在公開時編輯我的回復。


編輯:

您現在可以使用OfficeHelpers輕松地與Microsoft,Google,Facebook或任何第三方OAuth提供商進行身份驗證。

這是圖書館: https//unpkg.com/@microsoft/office-js-helpers@0.5.0/dist/office.helpers.js

這是文檔: https//github.com/OfficeDev/office-js-helpers

如果您有任何問題/發現錯誤,請提交問題https://github.com/OfficeDev/office-js-helpers/issues

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM