mbegan / Okta-PSModule

Okta API Powershell Wrapper Module
Other
102 stars 31 forks source link

Add support for Lifecycle Reactivate function #56

Open vsqz-dev opened 2 years ago

vsqz-dev commented 2 years ago

Users that are suspended can't be reactiveated using the lifecycle/activate endpoint. There is a dedicated enpoint lifecycle/reactivate but the module currently doesn't support it. I tried adding a funciton oktaReactivateUserbyID to the Okta.psm1 file and updating its $resource value to:

[string]$resource = '/api/v1/users/' + $uid + '/lifecycle/reactivate?sendEmail=False'

but I'm getting the following error when trygin to run the new function after saving and reimporting the module:

oktaReactivateUserbyID : The term 'oktaReactivateUserbyID' is not recognized as the name of a cmdlet, function, script file, or operable program.

I'm probably not doing it right but it would a really useful function to run batch job against. Tx.