I need to revoke access from users, having an array of their emails.
I found some methods from the Management API to do so, but all of them use accountId
as a user identifier.
Could someone please tell me if there is a better approach than scanning all GA users with the /management/accountSummaries method, finding users with needed emails, and using their accountId
to revoke access?
Thank you :)
Assuming i understand.
The only way to go about this would be to use the accountSummeries endpoint to get a full list back of all of the accounts you personally have access to.
Then for each property i would run a profileUsersLinks.List to get a list back of all the users who have access to each of your properties.
Once you find one that you want to remove you can simply run. ProfileUsersLinks.delete
This is going to be a several step process as there is no other way of linking a email to a profile / account.