Although selecting -templatesafe parameter when running this script, no new safes are created for accounts when the safe does not exist already.
Steps to Reproduce
Run the AOU script including the parameters -create and -templatesafe
Expected Results
Script reads a line for an account to be onboarded
script should check if safe exists
If safe exists, carry on and check if account already exists and then onboard account if unique
if safe does not exist, create a new safe
carry on going through csv for each account on there.
Actual Results
When attempting to onboard an account where the safe does not already exist, the logic seems to fail. If the safe does ot does not exist the output in the debug log states 'Safe exists.
Seems like the logic for the function 'Test-Safe' is bad with $true always being returned
`
try {
If ($null -eq $(Get-Safe -safeName $safeName -ErrAction "SilentlyContinue")) {
What version of the product are you running? Any version info that you can
share is helpful. For example, you might give the version from Docker logs,
the Docker tag, a specific download URL, the output of the /info route, etc.
Environment setup
Can you describe the environment in which this product is running? Is it running on a VM / in a container / in a cloud?
Which cloud provider? Which container orchestrator (including version)?
The more info you can share about your runtime environment, the better we may be able to reproduce the issue.
Summary
Although selecting -templatesafe parameter when running this script, no new safes are created for accounts when the safe does not exist already.
Steps to Reproduce
Expected Results
Script reads a line for an account to be onboarded script should check if safe exists If safe exists, carry on and check if account already exists and then onboard account if unique if safe does not exist, create a new safe carry on going through csv for each account on there.
Actual Results
When attempting to onboard an account where the safe does not already exist, the logic seems to fail. If the safe does ot does not exist the output in the debug log states 'Safe exists.
Seems like the logic for the function 'Test-Safe' is bad with $true always being returned ` try { If ($null -eq $(Get-Safe -safeName $safeName -ErrAction "SilentlyContinue")) {
Safe does not exist
`
Reproducible
Version/Tag number
What version of the product are you running? Any version info that you can share is helpful. For example, you might give the version from Docker logs, the Docker tag, a specific download URL, the output of the
/info
route, etc.Environment setup
Additional Information
Add any other context about the problem here.