
TomL.52591 (Customer) asked a question.
We'd like to find a way to create new groups with API in Powershell (on Windows 10 or Windows servers 2012/2016). For example, create a group 'Sales Department' with API in Powershell, then use group rule 'Sales' to add every perosn in Sales Department to this group.
Even better, this scrip will be triggered to create a new group 'Sales Department' when OKta detects the first person in 'Sales Department' in the person's profile coming into OKta's directory. Then adds this person and all persons in sales department to 'Sales Department' by rule.

Please check the following link it will point you to some examples of how this might be done.
https://github.com/okta/okta-sdk-dotnet/blob/legacy/Okta.Core.Automation/README.md
Also here is the Okta documentation on group APIs https://developer.okta.com/docs/api/resources/groups
If you encounter any issues with this and need assistance please contact Okta Support.