Directory API 문제 해결
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 페이지에서는 리셀러로서 Directory API와 관련하여 발생할 수 있는 몇 가지 일반적인 문제에 대해 설명합니다.
400:badRequest
잘못된 매개변수 값이 메서드에 전달되면 이 오류가 발생합니다.
users.get
메서드를 사용하는 경우 userKey
매개변수에 전달된 값이 사용자의 기본 이메일 주소, 별칭 이메일 주소 또는 고유 사용자 ID인지 확인합니다.
users.list
메서드를 사용하는 경우 다음 매개변수를 확인하세요.
customer
매개변수: Google에서 생성한 customerId
만 사용하세요. 실제 고객의 도메인을 사용하지 마세요. 고객에게 보조 도메인이 있는 경우 domain
매개변수를 사용하면 해당 도메인의 이메일 주소가 있는 사용자만 반환되므로 이 매개변수를 사용하는 것이 좋습니다.
domain
매개변수: 실제 고객의 도메인만 사용합니다. Google에서 생성한
customerId
를 사용하지 마세요.
403:domainCannotUseApis
이 오류는 고객이 Admin SDK API에 대한 리셀러 액세스를 사용 중지한 경우 발생합니다. 이 문제를 해결하려면 고객에게 Admin SDK API에 대한 액세스를 다시 사용 설정하도록 요청하세요. 자세한 내용은 API 액세스 제어를 참고하세요.
현재 라이선스가 부여된 사용자의 수를 가져오려고 하는데 이 오류가 표시되면 users.list
메서드를 호출하는 대신 구독 리소스의 licensedNumberOfSeats
필드를 사용하세요.
403:forbidden
이 오류는 고객을 소유하지 않거나 고객이 관리 콘솔에 대한 리셀러 액세스를 사용 중지한 경우에 발생합니다.
이 문제를 해결하려면 고객의 리셀러 소유권을 확인하기 전에 customers.get
메서드를 호출하거나 고객에게 관리 콘솔에 대한 리셀러 액세스를 다시 사용 설정하도록 요청하세요. 자세한 내용은 고객의 관리 콘솔에 액세스하기를 참고하세요.
이 오류는 Google Cloud 프로젝트에서 API가 사용 설정되지 않은 경우 발생합니다. 이 문제를 해결하려면 Google Cloud 콘솔로 이동하여 API를 사용 설정하세요. 자세한 내용은 Google Workspace API 사용 설정을 참고하세요.
409:duplicate
이 오류는 새 사용자를 추가하려고 하는데 고객의 기본 이메일이 다음 중 하나에 이미 있는 경우 발생합니다.
- 사용자를 추가하려는 현재 Google Workspace 계정
- 다른 Google 제품 (Google Workspace 아님)
이 문제를 해결하려면 다음 단계를 따르세요.
users.get
메서드를 호출합니다.
200
응답이 표시되면 사용자가 이미 고객의 Google Workspace 계정에 있는 것입니다. 이 사용자를 계정에 추가할 수 없습니다.
403 forbidden
응답을 받으면 기본 이메일 매개변수의 도메인이 재판매된 고객이 아니거나 기본 이메일이 이전에 다른 Google 제품에 사용되었으며 이 사용자를 성공적으로 추가하려면 먼저 고객의 도메인을 인증해야 합니다.
고객의 도메인을 확인할 수 있는 경우 다음 단계를 따르세요.
users.insert
메서드를 사용하여 임시 관리자 사용자를 만들고 최종 도메인 확인 단계까지 프로비저닝을 계속합니다.
- 도메인을 확인할 때
webResource.insert
호출의 요청 본문에 임시 사용자를 추가합니다.owners[]
200
응답을 받을 때까지 이 호출을 실행합니다.
- 도메인이 확인되면
users.patch
또는 users.update
메서드를 사용하여 임시 사용자 이름을 변경합니다.
고객의 도메인을 확인할 수 없는 경우 다음 단계를 따르세요.
users.insert
메서드를 사용하여 임시 관리자 사용자를 만듭니다.
- 고객이 임시 사용자로 로그인하고 관리 콘솔을 통해 도메인을 확인하도록 합니다.
- 도메인이 확인되면 고객 또는 파트너가 임시 사용자 이름을 변경할 수 있습니다.
users.patch
또는 users.update
메서드를 사용할 수 있습니다.
412:limitExceeded
이 오류는 고객이 최대 시트 한도에 도달한 경우 발생합니다. 이 문제를 해결하려면 subscriptions.changeSeats
메서드를 사용하고 구독 요금제에 따라 다음을 사용하세요.
FLEXIBLE
의 경우 maximumNumberOfSeats
매개변수를 늘립니다.
ANNUAL
의 경우 numberOfSeats
매개변수를 늘립니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[],[],null,["# Troubleshoot Directory API issues\n\nThis page describes some common issues that you might encounter involving the\nDirectory API as a reseller.\n\n`400:badRequest`\n----------------\n\nThis error occurs when an incorrect parameter value is passed into the method.\n\nIf using the `users.get` method, verify that the value passed into the `userKey`\nparameter is either the user's primary email address, alias email address, or\nunique user ID.\n\nIf using the `users.list` method, verify the following parameters:\n\n- `customer` parameter: Only use the `customerId` that was generated by Google. Don't use the actual customer's domain. We recommend using this parameter because if a customer has secondary domains, using the `domain` parameter only returns users with email addresses on that particular domain.\n- `domain` parameter: Only use the actual customer's domain. Don't use the \n `customerId` that was generated by Google.\n\n`403:domainCannotUseApis`\n-------------------------\n\nThis error occurs when your customer has disable reseller access to the\nAdmin SDK API. To resolve this issue, ask your customer to re-enable access to\nthe Admin SDK API. For more information, see\n[Control API access](https://support.google.com/a/answer/60757).\n\nIf you're trying to get the count of current licensed users and you get this\nerror, instead of calling the `users.list` method, use the `licensedNumberOfSeats` field\nfrom the subscription resource.\n\n`403:forbidden`\n---------------\n\nThis error occurs when you don't own the customer or your customer has disabled\nreseller access to their Admin console.\n\nTo resolve this issue, either call the\n[`customers.get` method](/workspace/admin/reseller/v1/reference/customers/get)\nbefore making calls to verify reseller ownership of customer or ask your\ncustomer to re-enable reseller access to their Admin console. For more\ninformation, see\n[Access a customer's Admin console](https://support.google.com/work/reseller/answer/6184379).\n\n`403:usageLimits.accessNotConfigured`\n-------------------------------------\n\nThis error occurs when the API isn't enabled in the Google Cloud project. To resolve\nthis issue, go to the Google Cloud console, and enable the API. For more\ninformation, see\n[Enable Google Workspace APIs](/workspace/guides/enable-apis).\n\n`409:duplicate`\n---------------\n\nThis error occurs when you're trying to add a new user, but the customer's\nprimary email already exists within one of the following:\n\n- Current Google Workspace account that you're trying to add them to.\n- Another Google product (not Google Workspace).\n\nTo resolve this issue, do the following:\n\n1. Call the `users.get` method.\n\n If you get a `200` response, then the user already exists in the customer's\n Google Workspace Account. You can't add this user to the account.\n\n If you get a `403 forbidden` response, then either the domain in the primary\n email parameter isn't a resold customer or the primary email has been used\n previously for a different Google product and the customer's domain must\n first be verified before this user can successfully be added.\n2. If you can verify the customer's domain, do the following:\n\n 1. Create a temporary admin user using the [`users.insert` method](/workspace/admin/directory/v1/reference/users/insert) and continue provisioning to the final domain verification step.\n 2. When verifying the domain, add the temporary users into the `owners[]` parameter of the request body for the [`webResource.insert` call](/site-verification/v1/webResource/insert). Make this call until you receive a `200` response.\n 3. After the domain is verified, rename the temporary username by using either the [`users.patch`](/workspace/admin/directory/v1/reference/users/patch) or the [`users.update`](/workspace/admin/directory/reference/rest/v1/users/update) methods.\n3. If you can't verify the customer's domain, do the following:\n\n 1. Create a temporary admin user using the [`users.insert` method](/workspace/admin/directory/v1/reference/users/insert).\n 2. Have your customer sign in as the temporary user and verify their domain through the Admin console.\n 3. After the domain is verified, either the customer or you can rename the temporary username. You can use either the [`users.patch`](/workspace/admin/directory/v1/reference/users/patch) or the [`users.update`](/workspace/admin/directory/reference/rest/v1/users/update) methods.\n\n`412:limitExceeded`\n-------------------\n\nThis error occurs when your customer has reached their maximum seat limit. To\nresolve this issue, Use the [`subscriptions.changeSeats` method](/workspace/admin/reseller/v1/reference/subscriptions/changeSeats)\nand depending on their subscription plan, use the following:\n\n- For `FLEXIBLE`, increase the `maximumNumberOfSeats` parameter.\n- For `ANNUAL`, increase the `numberOfSeats` parameter."]]