Method: roles.get

擷取角色。

HTTP 要求

GET https://admin.googleapis.com/admin/directory/v1/customer/{customer}/roles/{roleId}

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

路徑參數

參數
customer

string

客戶 Google Workspace 帳戶的專屬 ID。如果是多重網域帳戶,請使用這個欄位 (而非 domain) 擷取客戶的所有群組,您也可以使用 my_customer 別名來代表帳戶的 customerIdcustomerId 也會做為 Users 資源的一部分傳回。您必須提供 customerdomain 參數。

roleId

string

角色的不可變更 ID。

要求主體

要求主體必須為空白。

回應主體

如果成功,回應主體會包含 Role 的執行例項。

授權範圍

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

  • https://www.googleapis.com/auth/admin.directory.rolemanagement
  • https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly

詳情請參閱授權指南