You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the situation where there is a boolean parameter and the parameter is part of one of the checks for value before use the logic in the functions treats a false as do not do the logic
I struck this when trying to use the New-OktaUser function and passing false to the activate function to prevent an email activation.
The example/scenario is
Call the New-OktaUser -Body $body -Activate $false
…ta#70)
Uses PSBoundParameter.ContainsKey rather than the if of the variable as
if the passed in value is 0 or $false the set is not done
same issue as okta#56, but in a different template
In the situation where there is a boolean parameter and the parameter is part of one of the checks for value before use the logic in the functions treats a false as do not do the logic
I struck this when trying to use the
New-OktaUser
function and passing false to the activate function to prevent an email activation.The example/scenario is
Call the
New-OktaUser -Body $body -Activate $false
In the function this hits this line https://github.com/okta/okta-powershell-cli/blob/b01fd0a387e16d082ca833888fba9679a63527e9/src/Okta.PowerShell/Api/OktaUserApi.ps1#L626-628
This logic reads the parameter and skips setting the value in the dictionary as $Activate is false
The call to the API is made and the APIs value for this when not provided is True
User is created and activated and messages get sent
From the code it looks like the logic is meant to be if this parameter was provided, ,but the logic is off
The text was updated successfully, but these errors were encountered: