2017-09-26 67 views
0

我們需要訪問power bi rest api's和我們目前正在使用adal.js這是工作正常的身份驗證。但問題是它打開彈出窗口的autentication.Is有一些方法來默認使用用戶名和密碼使用js,因爲最終用戶將沒有任何憑據(我們需要在wordpress中集成)?以編程方式登錄到天藍色廣告JavaScript的電源雙本地應用程序

我知道這可以在.net中輕鬆完成,但我們需要使用純JavaScript完成,任何幫助建議都會被處理。

回答

0

任何其他人誰正在尋求同一個問題的答案,我是能夠通過如下API

"https://login.windows.net/common/oauth2/token" 

使用參數,以獲得訪問令牌就像

  "client_id"=clientID 
      "grant_type"= "password" 
      "resource"= "https://analysis.windows.net/powerbi/api" 
      "username"= username 
      "password"= password 

和設置內容類型"application/x-www-form-urlencoded"