Open gabrielsroka opened 5 months ago
Hi @gabrielsroka,
Thanks for reporting this issue. Since this module is generated from the Open API spec, we'll have to dig into the OpenAPI spec and codegen tooling to see why this particular command doesn't follow the PowerShell Verbs guidelines. I have filed an internal ticket to address this issue so it can be reviewed and prioritized during team planning.
Although passing an API token to the module may be possible, we don't officially support it, and we encourage everyone to use OAuth.
Internal Ref: OKTA-727804
@laura-rodriguez, can you get a solid answer from the devs on if and how its possible to use an API Token with the Okta.PowerShell module, instead of having to login every time you want to use the module? I'm sure many admins would like to truly automate tasks, and having to login manually is not automation.
you totally can. i thought i shared the steps and the concern a few months ago. lemme find it.
i think this is it. lemme test it some more
$Configuration = Get-OktaConfiguration
$Configuration.BaseUrl = 'https://YOURORG.okta.com'
$Configuration.DefaultHeaders = @{authorization = 'SSWS TOKEN'}
Get-oktaUser gabrielsroka
it worked with v.1.0.1. i'm updating it and testing again.
yep, it works with 1.0.2, too.
oh, yep. i did share it here :)
https://github.com/okta/okta-powershell-cli/issues/40#issue-2278296233
Awesome, thank you! I did not see the other post.
should https://github.com/okta/okta-powershell-cli/blob/main/docs/OktaUserApi.md#Rename-OktaPassword be called
Set-OktaUserPassword
, analogous to https://learn.microsoft.com/en-us/powershell/module/azuread/set-azureaduserpassword?view=azureadps-2.0 ?see also https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands
eg
also https://github.com/okta/okta-powershell-cli/blob/main/docs/OktaUserApi.md, etc, has links to https://github.com/okta/okta-powershell-cli/blob/main/README.md#apiToken which don't work. does the CLI support API Tokens?