Hi,
I am trying to figure out how to use the official powershell module to assign a bunch of users to an application.
In our organization, Okta users are added by an integration and sync from Active Directory. The users are already in place, and they are identified by their mail addresses.
I use this code to initialize the script:
$Configuration = Get-OktaConfiguration
$Configuration.BaseUrl = $env:OKTA_PS_ORG_URL
$Configuration.ClientId = $env:OKTA_PS_CLIENT_ID
$Configuration.Scope = “okta.groups.manage okta.apps.manage okta.users.manage”
Then I enable it:
Invoke-OktaEstablishAccessToken
Then I get the list of applications with their ID’s to localize the application I want to assign users to:
Get-OktaApplication -limit 200
Then I have a list with all the users (email addresses) that I want to assign the application to, but I can’t figure out how to do it. Documentation of module is very small, most commands just tell what they are used to, but no examples or instructions, so I am completely lost.
This is very important to me, because I have to assign hundreds of users to dozens of applications, and my company doesn’t want to use groups for this, so it takes me hours and even days and weeks do this work manually.
Thanks