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
Output:
Please enter your Automate Server address, IE: rancor.hostedrmm.com:
Expected:
Successfully tested and connected to the Automate REST API. Token will expire at 2022-03-0
1T18:24:49
Wondering if this is expected but when removing -TwoFactorToken it works correctly
The text was updated successfully, but these errors were encountered:
Moving line 89 to 108 should resolve the issue. Feel free to test it if you want to help speed it along.
The line is:
If ($TwoFactorToken -match '.+') {$Force=$True}
and it just needs to be moved to the line above:
} #End Begin
One issue though with your example is that you are skipping validation (-SkipCheck) and passing a -TwoFactorToken. That won't work. I'll need to try to sort out how to tag the parameter sets to prevent this from being accepted. The goal of this function is to get an authentication token. Skipcheck is for use when you want to pre-load the values in the script variables but not actually connect. (Like loading them from a stored file). Then you can just call connect-automateapi and it will try to validate things, AT WHICH POINT you would need the two factor token. So while it's not the cause of the issue you reported, if you are providing the -TwoFactorToken parameter you should not use -Skiptest because the two factor token will just be thrown away.
Connect-AutomateAPI -ClientID $ID
-Credential $Credential
-Server $server
-SkipCheck
-TwoFactorToken $TwoFactorPasscode
Output:
Please enter your Automate Server address, IE: rancor.hostedrmm.com:
Expected:
Successfully tested and connected to the Automate REST API. Token will expire at 2022-03-0
1T18:24:49
Wondering if this is expected but when removing -TwoFactorToken it works correctly
The text was updated successfully, but these errors were encountered: