I am managing my organisation of around 600 users, and we are trying to take advantage of custom attributes in order to build dynamic groups to control user access.
I can see there is a bulk update option for users via csv upload, but this only appears to include system attributes and not my custom ones.
Is there a way, either via the admin portal or via API that will allow me to bulk update the custom attributes across my organisation without going through each person individually?
You can do this with the free, open source, command-line, indispensable GAM tool. Check out:
for more details.
Specifically, check out https://github.com/GAM-team/GAM/wiki/Command-Reference:-Users#gam-who-update-user-options
Hope that helps,
Ian
Ideally, Google will establish the means to apply app-specific custom attributes so that the individual accounts won't have to be modified. It's a maintenance nightmare. Other IdP SAML implementations allow for this.
Here is a app script code which uses a Google sheet to retrive the values. Make sure to add the Admin SDK service to the project, Also make sure to replace necessary parameters in the below code. This I had designed for a Custom Schema with one Category and Single Valued Field.
@vrnazre That is great. I set it up and tested it and it was so simple to do!
I'd like to automate it. Do you think this would work?
The thing is I had added the "Yes" status to make sure the completed ones don't get updated again. As there is some quota tied to the API. Yes, definitely you can automate it based on your requirements. You can further make this code better by simply retriving the schema category and field from the sheet itself(like a sheet context based browser input box or from a some fixed cell in the sheet)
If you want to give this control to an end user, just set up a form and add necessary fields in the form and set a trigger to have on-submit.
@vrnazre Thank you for this.
I know this is a stretch, but is there any way to keep this Sheet synced with the Google Workspace Directory so that if an admin updates an individual user in Google Admin Console it would update the Sheet? Essentially a bi-directional sync between the Sheet and Google Directory.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |