Method: users.get
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
किसी उपयोगकर्ता की जानकारी दिखाता है.
एचटीटीपी अनुरोध
GET https://admin.googleapis.com/admin/directory/v1/users/{userKey}
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
userKey |
string
एपीआई अनुरोध में उपयोगकर्ता की पहचान करता है. वैल्यू, उपयोगकर्ता का मुख्य ईमेल पता, उपनाम वाला ईमेल पता या यूनीक उपयोगकर्ता आईडी हो सकता है.
|
क्वेरी पैरामीटर
पैरामीटर |
customFieldMask |
string
स्कीमा के नामों की कॉमा लगाकर अलग की गई सूची. इन स्कीमा के सभी फ़ील्ड फ़ेच किए जाते हैं. इसे सिर्फ़ तब सेट किया जाना चाहिए, जब projection=custom .
|
projection |
enum (Projection )
इस उपयोगकर्ता के लिए, फ़ील्ड का कौनसा सबसेट फ़ेच करना है.
|
viewType |
enum (ViewType )
उपयोगकर्ता का सिर्फ़ एडमिन व्यू फ़ेच करना है या डोमेन के सभी उपयोगकर्ताओं के लिए उपलब्ध सार्वजनिक व्यू. ज़्यादा जानकारी के लिए, किसी उपयोगकर्ता को एडमिन के तौर पर वापस लाना लेख पढ़ें.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य हिस्सा
कामयाब रहने पर, जवाब के मुख्य हिस्से में User
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
इसके लिए, OAuth के इनमें से किसी एक स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/admin.directory.user
https://www.googleapis.com/auth/admin.directory.user.readonly
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
अनुमान
Enums |
BASIC |
उपयोगकर्ता के लिए कोई कस्टम फ़ील्ड शामिल न करें. |
CUSTOM |
customFieldMask में अनुरोध किए गए स्कीमा के कस्टम फ़ील्ड शामिल करें. |
FULL |
इस उपयोगकर्ता से जुड़े सभी फ़ील्ड शामिल करें. |
ViewType
Enums |
admin_view |
नतीजों में, उपयोगकर्ता के लिए सिर्फ़ एडमिन और डोमेन के लिए सार्वजनिक, दोनों तरह के फ़ील्ड शामिल होते हैं. |
domain_public |
नतीजों में, उपयोगकर्ता के सिर्फ़ वे फ़ील्ड शामिल होते हैं जो डोमेन के दूसरे उपयोगकर्ताओं को सार्वजनिक तौर पर दिखते हैं. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],[],null,["Retrieves a user.\n\nHTTP request\n\n`GET https://admin.googleapis.com/admin/directory/v1/users/{userKey}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `userKey` | `string` Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. |\n\nQuery parameters\n\n| Parameters ||\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customFieldMask` | `string` A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`. |\n| `projection` | `enum (`[Projection](/workspace/admin/directory/reference/rest/v1/users/get#Projection)`)` What subset of fields to fetch for this user. |\n| `viewType` | `enum (`[ViewType](/workspace/admin/directory/reference/rest/v1/users/get#ViewType)`)` Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](https://developers.google.com/workspace/admin/directory/v1/guides/manage-users#retrieve_users_non_admin). |\n\nRequest body\n\nThe request body must be empty.\n\nResponse body\n\nIf successful, the response body contains an instance of [User](/workspace/admin/directory/reference/rest/v1/users#User).\n\nAuthorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/admin.directory.user`\n- `\n https://www.googleapis.com/auth/admin.directory.user.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nProjection\n\n| Enums ||\n|----------|--------------------------------------------------------------------|\n| `BASIC` | Do not include any custom fields for the user. |\n| `CUSTOM` | Include custom fields from schemas requested in `customFieldMask`. |\n| `FULL` | Include all fields associated with this user. |\n\nViewType\n\n| Enums ||\n|-----------------|--------------------------------------------------------------------------------------------------|\n| `admin_view` | Results include both administrator-only and domain-public fields for the user. |\n| `domain_public` | Results only include fields for the user that are publicly visible to other users in the domain. |"]]