本文件包含 API 專屬授權和驗證資訊。閱讀這份文件前,請務必參閱「瞭解驗證與授權」一文,瞭解 Google Workspace 的一般驗證和授權資訊。
如要定義應用程式授予的存取權層級,您必須找出並宣告授權範圍。授權範圍是 OAuth 2.0 URI 字串,內含 Google Workspace 應用程式名稱、存取的資料類型和存取層級。
如要進一步瞭解範圍,請參閱「如何選擇應用程式的範圍」。
Directory API 支援下列範圍:
裝置範圍 | 意義 |
---|---|
https://www.googleapis.com/auth/admin.directory.device.chromeos |
可存取所有 Chrome 裝置作業的全域範圍。 |
https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly |
僅擷取 Chrome 裝置的範圍。 |
https://www.googleapis.com/auth/admin.directory.device.mobile |
可存取所有行動裝置作業的全域範圍。 |
https://www.googleapis.com/auth/admin.directory.device.mobile.readonly |
僅擷取行動裝置的範圍 |
https://www.googleapis.com/auth/admin.directory.device.mobile.action |
在行動裝置上執行特定操作的工作範圍。 |
群組、群組別名和群組成員的範圍 | 意義 |
https://www.googleapis.com/auth/admin.directory.group.member |
所有群組成員角色和資訊作業存取權的範圍。 |
https://www.googleapis.com/auth/admin.directory.group.member.readonly |
此範圍只能擷取群組成員角色和資訊。 |
https://www.googleapis.com/auth/admin.directory.group |
所有群組作業存取權的全域範圍,包括群組別名和成員。 |
https://www.googleapis.com/auth/admin.directory.group.readonly |
此範圍只能擷取群組、群組別名和成員資訊。 |
機構單位的範圍 | 意義 |
https://www.googleapis.com/auth/admin.directory.orgunit |
可存取所有機構單位作業的全域範圍。 |
https://www.googleapis.com/auth/admin.directory.orgunit.readonly |
僅擷取機構單位的範圍。 |
使用者和別名的範圍 | 意義 |
https://www.googleapis.com/auth/admin.directory.user |
可存取所有使用者和使用者別名作業的全域範圍。 |
https://www.googleapis.com/auth/admin.directory.user.readonly |
僅擷取使用者或使用者別名的範圍。 |
https://www.googleapis.com/auth/admin.directory.user.alias |
存取所有使用者別名作業的範圍。 |
https://www.googleapis.com/auth/admin.directory.user.alias.readonly |
僅擷取使用者別名的範圍。 |
使用者安全性功能範圍 | 意義 |
https://www.googleapis.com/auth/admin.directory.user.security |
存取所有應用程式密碼、OAuth 權杖和驗證碼作業範圍。 |
角色管理範圍 | 意義 |
https://www.googleapis.com/auth/admin.directory.rolemanagement |
所有角色管理作業的適用範圍,包括建立角色和角色。 |
https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly |
取得和列出角色、權限和角色指派的範圍。 |
自訂使用者架構的範圍 | 意義 |
https://www.googleapis.com/auth/admin.directory.userschema |
存取所有自訂使用者結構定義作業的範圍。 |
https://www.googleapis.com/auth/admin.directory.userschema.readonly |
僅擷取自訂使用者架構的範圍。 |
客戶的範圍 | 意義 |
https://www.googleapis.com/auth/admin.directory.customer |
所有客戶作業存取權的範圍。 |
https://www.googleapis.com/auth/admin.directory.customer.readonly |
此範圍僅適用於擷取客戶。 |
網域範圍 | 意義 |
https://www.googleapis.com/auth/admin.directory.domain |
所有網域作業存取權的範圍。 |
https://www.googleapis.com/auth/admin.directory.domain.readonly |
僅擷取網域的範圍。 |
日曆資源範圍 | 意義 |
https://www.googleapis.com/auth/admin.directory.resource.calendar |
所有日曆資源作業的存取權範圍。 |
https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly |
僅擷取日曆資源的範圍。 |