I am trying to Add user into AAD group using Automation Service -Runbook Powershell.
I have created a Credentials Username : XYZ pwd:ABC
and then trying below Powershell script, but getting below error.
Powershell script:
$aadAdminCred = Get-AutomationPSCredential -Name 'PSCredUser'
Connect-AzureAD -TenantId "xxxx" -Credential $aadAdminCred
Error:
+ Connect-AzureAD -TenantId "xxxx" -Cr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], AggregateException
+ FullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD
Connect-AzureAD : parsing_wstrust_response_failed: Parsing WS-Trust response failed
At line:9 char:1
+ Connect-AzureAD -TenantId "xxxx" -Cr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : AuthenticationError: (:) [Connect-AzureAD], AdalException
+ FullyQualifiedErrorId : Connect-AzureAD,Microsoft.Open.Azure.AD.CommonLibrary.ConnectAzureAD


