Guys,
We have peace of code like this:
Update-MSGraphEnvironment -AppId "e00ac69e-........"
$cred = Get-Credential
connect-msgraph -Credential $cred
if we store those creds somewhere or use it like this we are getting following error:
connect-msgraph : AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'. Trace ID: 45bee449-0fe5-4cf3-9aa1-c52277731b00 Correlation ID: 4e795f88-745a-4c30-9363-f3f25ae18c14 Timestamp: 2024-05-16 13:55:08Z
At line:1 char:1
connect-msgraph -Credential $cred
+ CategoryInfo : NotSpecified: (:) [Connect-MSGraph], AdalServiceException
+ FullyQualifiedErrorId : Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException,Microsoft.Intune.PowerShellGraphSDK.PowerShellCmdlets.Connect
However if we just run connect-msgraph and type creds in Azure windows that pop-ups script executes without issue but we need to store those creds so script can execute without our interaction...
Any idea how to solve this?
BR