Method: projects.locations.completeExternalIdentities

這個方法會根據提供的字首,為外部身分識別提供者管理的使用者和群組提供建議。

HTTP 要求

GET https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*}:completeExternalIdentities

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
parent

string

這是必要旗標,父項位置資源名稱,例如 projects/*/locations/global

查詢參數

參數
prefixQuery

string

這是必要旗標,要搜尋的前置字串。對使用者而言,這個前置字串會與 primaryEmail 比對。如果是群組,系統會比對這個前置字串與 displayName。比對時不區分大小寫。

maxSuggestions

integer

選用。要傳回的使用者和群組結果數上限。服務傳回的產品數量可能會少於這個值。

如未指定,系統最多會傳回 6 個結果。系統會盡可能平均分配使用者和群組的限制。舉例來說,如果 maxSuggestions 為 7,服務可能會傳回 4 個使用者和 3 個群組。如果其中一種建議的數量少於限制的一半,另一種建議可能會傳回更多建議,最多可達 maxSuggestions 限制。

entityTypeFilter

enum (EntityTypeFilter)

選用。要擷取的實體類型。如未設定,系統會傳回所有實體類型。

useScimIdentities

boolean

選用。是否使用 SCIM 身分完成外部身分驗證。如果為 false,我們會呼叫 Microsoft Graph API 來擷取外部身分。

要求主體

要求主體必須為空白。

回應主體

CompletionService.CompleteExternalIdentities 的回應訊息。

如果成功,回應主體會含有以下結構的資料:

JSON 表示法
{
  "externalIdentities": [
    {
      object (ExternalIdentity)
    }
  ]
}
欄位
externalIdentities[]

object (ExternalIdentity)

符合查詢條件的外部身分清單。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.serving.readwrite

詳情請參閱Authentication Overview

IAM 權限

需要 parent 資源的下列 IAM 權限:

  • discoveryengine.locations.completeExternalIdentities

詳情請參閱 IAM 說明文件

EntityTypeFilter

要擷取的實體類型。

列舉
ENTITY_TYPE_FILTER_UNSPECIFIED 未指定實體類型篩選器。
USERS 只能擷取使用者。
GROUPS 僅擷取群組。

ExternalIdentity

代表使用者或群組的外部身分。這個使用者或群組來自外部識別資訊提供者 (IdP)。

JSON 表示法
{
  "externalId": string,
  "displayName": string,

  // Union field EntityType can be only one of the following:
  "userMetadata": {
    object (UserMetadata)
  },
  "groupMetadata": {
    object (GroupMetadata)
  }
  // End of list of possible types for union field EntityType.
}
欄位
externalId

string

實體(使用者或群組) 的專屬第三方 ID (externalId)。

displayName

string

使用者或群組的顯示名稱。

聯集欄位 EntityType。外部身分類型。這項屬性用於指出實體類型 (使用者或群組) 和對應的中繼資料。EntityType 只能是下列其中一個設定:
userMetadata

object (UserMetadata)

外部使用者對應的中繼資料。

groupMetadata

object (GroupMetadata)

外部使用者對應的中繼資料。

UserMetadata

外部使用者對應的中繼資料。

JSON 表示法
{
  "givenName": string,
  "familyName": string,
  "primaryEmail": string
}
欄位
givenName

string

使用者的名字。

familyName

string

使用者的姓氏。

primaryEmail

string

使用者的主要電子郵件地址。

GroupMetadata

這個類型沒有任何欄位。

外部群組對應的中繼資料。