User Group Membership Automation with Python/Terraform

,

Hello All,

hope you are all doing good.

I have a quick question regarding automating user group membership. I have some 1000 users, which I want to add to a specific group and have been doing some research on the Zscaler API documentation but also on Terraform, but couldn’t find something specific to this scenario.

Does anyone of you have experience with this?

Thank you very much.

Best,
Atdhe

I have been diving in as well with the API and giving it some reading of the documentation. One of the things I believe you will run into is rate limiting. The documentation mentions that PUT requests will be limited to 400 req/hr.

I am not Terraform expert at all honestly. But looking at the documentation I also don’t see any system context authentication options. So that means your API key will likely be in plain text somewhere.

As for actually updating user groups, it seems pretty straightforward with the /users/{user-id} endpoint where it receives a group object.

EDIT: looking at the /users/{user-id} PUT summary, Rate limiting is at 2/sec 1000rq/hr so you should be fine there.

1 Like

thank you very much for your input :slight_smile: