閱讀英文

共用方式為


使用 OData 摘要登入的疑難排解

本文包含針對 OData 摘要使用組織帳戶登入時的疑難排解選項:

  • 不支援的認證類型錯誤
  • 拒絕存取錯誤

下列各節會描述每個錯誤,並接著說明這些錯誤的補救步驟。

不支援的認證類型

您可能看到下列錯誤,指出不支援認證類型:

輸出
We are unable to connect because this credential type is not supported 
by this resource. Please choose another credential type.

您必須確定您的服務正在傳送 auth 標頭,如下所示:

  • 沒有任何 authorization 標頭的第一個 Oauth 要求應傳送下列標頭作為回應:

    輸出
    www-authenticate: Bearer realm=https://login.microsoftonline.com/<Your Active Directory Tenant Id> 
    
  • authorization 標頭設為 Bearer 之服務的重新導向要求應傳送下列標頭作為回應:

    輸出
    www-authenticate: Bearer authorization_uri=https://login.microsoftonline.com/<Your Active Directory Tenant Id>/oauth2/authorize
    

成功重新導向呼叫之後,對服務的呼叫在授權標頭中具有正確的存取權杖。 如果仍然看到錯誤,請清除 OData 服務 URI 的 [全域權限],然後再試一次。 若要清除 [全域權限],請移至 [檔案]>[選項和設定]>[資料來源設定]>[全域權限]

拒絕存取

您可能會看到下列其中一個錯誤,指出存取遭到拒絕:

輸出
access_denied: AADSTS650053: The application 'Microsoft Power Query for Excel' 
asked for scope 'user_impersonation' that doesn't exist 
on the resource \<resourceId\>.
輸出
Microsoft Power Query for Excel needs permission to access resources 
in your organization that only an admin can grant. 
Ask an admin to grant permission to this app before you can use it.

如果您遇到這類錯誤,請確定 OData 服務的應用程式註冊具有下列設定:

  • 應用程式識別碼會設定為 OData 服務基底 URI。
  • 已定義範圍 user_impersonation
  • 系統管理員會適當地設定應用程式的權限。

您可以使用 Power BI Desktop 執行各種作業。 如需有關其功能的詳細資訊,請參閱下列資源: