Question

I wonder if there is a stable uuid ( unique user id ) when using the Google provisioning API. The use case would be, that a user is marrying and changing their last name and username, but we still want to find the same user.

Was it helpful?

Solution

The Provisioning API does not expose a user's unique Google ID. The official Google Apps Directory Sync tool handles tracking users through renames by mapping the email address to a UID on the source LDAP server. You could implement something similar but this does not solve the case where the rename is done by another admin interactively in the CPanel.

An account's Google Unique ID is exposed via the Google+ API: https://developers.google.com/+/api/latest/people/get

you could experiment with searching for the user by email address via the Google+ API in order to determine their UID but that may be problematic and unreliable.

Update: The new Admin SDK Directory API allows retrieval of a user's unique Google ID (it's the id attribute).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top