I am trying to connect within a Azure DevOps pipeline using Image Windows-Latest to Azure AD. Overall I am automating a Privilege Identity Management by using the AzureADPreview Module. The Modules installs as expected however the problem is after any command I get the following error in the pipeline.
Error reading JToken from JsonReader. Path '', line 0, position 0.
I am using the following commands to connect inside the pipeline to connect:
I have been doing some more digging. There is one more point that I have to make, that MFA is enabled on the tenant. Decoding the token that is provided by the commands in jwt.io the MFA enabled flag will not be set. I have read on other forums that Connect-AzureAD using the AADToken when MFA has been set does not work. Sounds like this could be a non-starters