
Cole Fortunes (Customer) asked a question.
I am curious if anyone was successfully able to utilize PowerShell and authenticate via MFA and OTP grant type instead of utilizing the password grant type
I am able to authenticate with the password grant type through a PowerShell script/program. However, i am trying to update it to utilize the OTP grant method so it utilizes MFA for our organizations requirements. Would anyone have any advise or examples? Within our powershell script we are also using a conversion to JSON
This example might help. It is part of a PowerShell module for accessing the REST API, but it shows how to catch the exception from authenticating with username/password and then submit the OTP code.
https://github.com/Tony-Perri/MOVEit.MIT/blob/main/MOVEit.MIT/Public/Connect-MITServer.ps1