Assigning users to domain groups via API
I would like to assign users in specific regions (with specific country codes) to (already created) domain groups so that we can enforce preferred policies. Is there any documentation or examples of how to assign users to groups?
The Advanced employee updater introduction webpage explains: "Assign employees to Expensify domain groups based on customizable fields, such as employee department, country, job code, etc.". However, there is no indication or explanation of how to do this.
I see that there is a "domainGroupID", but I am unaware of how to retrieve the IDs of our existing groups prior to attempting to add the users.
Any help would be appreciated. Thank you.
This was a struggle but I eventually found how to get this.
Open "Developers tools" in your browser and load the domain groups page (I had to force reload, it seems that data is not updated on normal refresh) and find the call to "https://www.expensify.com/api" in the network tab.
within that network request go to the preview tab and search for "groups" you should be able to find a few lines that looks like: domain_securityGroup_xxxxxx (the x replaces the group ID number) if you expend these objects you'd see the name of the group, just use the ID from the name (you only need the numbers). I hope this helps.