問題描述
我正在開發一個 Outlook 插件.我想在其中使用一個驅動器 API.我很容易獲得客戶端 ID 和客戶端密碼,以便將 API 用于一個驅動器個人帳戶.但是,當我為一個驅動器業務 API 注冊我的應用程序時天藍色的活動目錄,它只為我創建了一個客戶端 ID,但沒有創建任何客戶端密碼.我在注冊時選擇了本機應用程序,因為我的應用程序是本機應用程序.沒有客戶端密碼我無法驗證用戶.請告訴我,如何獲取客戶端密碼?提前謝謝.
I am developing an outlook plugin.I want use one drive API's in it.I easily got the client Id and client secret for using API's for one drive personal accounts.But, when I registered my application for one drive business API's in azure active directory, it created only a client Id for me, but didn't create any client secret.I chose native app while registering, as my app is a native app.I can't authenticate the user without the client secret.Please let me know , how to get the client secret?Thanks in advance.
推薦答案
本地客戶端沒有與之關聯的任何機密 - 鑒于它們旨在在設備上運行,假設它們無法保護一個秘密.本機客戶端使用 clientID 來指示客戶端應用程序,但身份驗證始終通過在流程中涉及用戶身份來完成.如果您在 http://github.com/azureadsamples 中選擇任何本機客戶端示例,您將看到 clientid足以觸發用戶身份驗證.
Native clients don't have any secrets associated to them - given that they are meant to run on devices, it is assumed that they would not be able to protect a secret. Native clients use the clientID for indicating the client app, but the authentication is always done by involving a user identity in the process. If you pick any of the native client samples in http://github.com/azureadsamples you will see how the clientid is enough to trigger user auth.
這篇關于如何從本機應用程序的天藍色活動目錄中獲取客戶端機密以使用一個驅動器業務 API?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!