Is there a way to read "Archived User" (AU) license using License Manager API? If so, please provide an example of the request. Thank you.
-
Hi! I posted an answer. Let me know if this solves your issue or if you need clarification about some point. Thank you. – Iamblichus Nov 12 '20 at 09:36
-
Thank you for your response - it helped us resolve the issue! – John Sanchez Dec 01 '20 at 16:02
1 Answers
Retrieve specific user:
You can either retrieve the License for a specific user, using LicenseAssignments: get.
In this case, you'll have to make the following request to this URL:
GET https://www.googleapis.com/apps/licensing/v1/product/{productId}/sku/{skuId}/user/{userId}
Where:
productIdshould be101034(productId for Archived User) (this ID is not officially documented and can only be indirectly retrieved using Reseller API, see Documentation missing section below).skuIdwould be1010340001forEnterprise - Archived Userand1010340002forBusiness - Archived User(these IDs are not officially documented and can only be indirectly retrieved using Reseller API, see Documentation missing section below).userIdwould be the user's current primary email address.
List for product or for product and SKU:
If you don't want to retrieve a specific user, you can also list Licenses according to productId and skuId:
GET https://www.googleapis.com/apps/licensing/v1/product/{productId}/users?customerId={customerId}
GET https://www.googleapis.com/apps/licensing/v1/product/{productId}/sku/{skuId}/users?customerId={customerId}
Documentation missing:
Archived User productId and skuId are not currently documented in the official API reference. There is currently a feature request regarding a documentation update:
I'd suggest you to star the issue in order to keep track of this and to help prioritizing its implementation.
Note on authorization:
Any of these methods would require getting authorized with the following scope: https://www.googleapis.com/auth/apps.licensing. I'm assuming you're not asking how to go through the OAuth process, and you just need information on what methods to use.
- 18,540
- 2
- 11
- 27