Method: users.get
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
HTTP 요청
GET https://admin.googleapis.com/admin/directory/v1/users/{userKey}
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
userKey |
string
API 요청에서 사용자를 식별합니다. 값은 사용자의 기본 이메일 주소, 별칭 이메일 주소 또는 순 사용자 ID일 수 있습니다.
|
쿼리 매개변수
매개변수 |
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
자세한 내용은 승인 가이드를 참고하세요.
투영
열거형 |
BASIC |
사용자의 맞춤 입력란은 포함하지 마세요. |
CUSTOM |
customFieldMask 에서 요청된 스키마의 맞춤 필드를 포함합니다. |
FULL |
이 사용자와 연결된 모든 필드를 포함합니다. |
ViewType
열거형 |
admin_view |
결과에는 사용자의 관리자 전용 필드와 도메인 공개 필드가 모두 포함됩니다. |
domain_public |
결과에는 도메인의 다른 사용자에게 공개적으로 표시되는 사용자의 필드만 포함됩니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 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. |"]]