Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 1.4 KB

assign-users-to-all-orgs.md

File metadata and controls

25 lines (15 loc) · 1.4 KB

Assign users to all orgs in a group

Description

Use this method to assign multiple users to all orgs in a group as group memebers

Flow and Endpoints

  1. Get group level service account token with admin permissions
  2. Check if list of users is already a group member or has accepted the invite.
    1. List all members in a group
  3. If not, must invite user to snyk at org level.
    1. Invite Users

Note: Check if the email user has accepted (can see by email and user ID from the API call in 2.1 above).  If there’s a user ID then you know they accepted and can move forward. Need to check this every day, few hours, whatever frequency desired (run the API calls over some frequency).

  1. List all organizations in a group

  2. Then, iterate over the list of orgs in the group and add user to each org (using user ID) with the Add a member to an organization within a group api call

Flow Chart

Decision tree:

Flow chart