Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell verbs #38

Open
gabrielsroka opened this issue Apr 22, 2024 · 8 comments
Open

PowerShell verbs #38

gabrielsroka opened this issue Apr 22, 2024 · 8 comments

Comments

@gabrielsroka
Copy link
Contributor

gabrielsroka commented Apr 22, 2024

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

Suspend Pauses an activity. For example, the Suspend-Service cmdlet pauses a service. This verb is paired with Resume.

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?

@laura-rodriguez
Copy link
Collaborator

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

@mpsny
Copy link

mpsny commented Sep 9, 2024

@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.

@gabrielsroka
Copy link
Contributor Author

you totally can. i thought i shared the steps and the concern a few months ago. lemme find it.

@gabrielsroka
Copy link
Contributor Author

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

@gabrielsroka
Copy link
Contributor Author

it worked with v.1.0.1. i'm updating it and testing again.

@gabrielsroka
Copy link
Contributor Author

yep, it works with 1.0.2, too.

@gabrielsroka
Copy link
Contributor Author

oh, yep. i did share it here :)

#40 (comment)

@mpsny
Copy link

mpsny commented Sep 9, 2024

Awesome, thank you! I did not see the other post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants