0

I am trying to use the Google api to get the license status of an user

And the api url is https://www.googleapis.com/apps/licensing/v1/product/Google-Apps/sku/1010020027/user/<user_id>?customerId=<customer_id>

But getting the error as "Error: Unauthorized operation for the given domain"

Rafiki
  • 1
  • This might help: https://stackoverflow.com/questions/26998293/google-enterprise-license-manager-api-unauthorized-operation-for-the-given-dom – Jason E. May 25 '21 at 21:38
  • Thank you Jason ! But had already tried the suggestion in that thread. still getting the same error – Rafiki May 26 '21 at 09:16

1 Answers1

0

are other license-related calls working?

aside from enabling the api, did you also go to admin.google.com > security > api controls > domain wide delegation and associate required scopes with your client?

in case a clue here is helpful -- some example code i used to get product license count, which also works per user:

https://github.com/googleapis/google-api-go-client/issues/1214

  • 1
    Please add further details to expand on your answer, such as working code or documentation citations. – Community Sep 10 '21 at 01:26