1 | initial version |
The error "AADSTS7000218: The request body should have 'clientassertion' or 'clientsecret' parameter" occurs when the Microsoft Authentication Library (MSAL) client application is missing the required client secret or client assertion.
To resolve this error, follow these steps:
Example command:
$clientId = "<your-client-id>"
$clientSecret = "<your-client-secret>"
Connect-MsalService -ClientId $clientId -ClientSecret $clientSecret
$token = Get-MsalToken -TenantId "<your-tenant-id>" -Scope "https://graph.microsoft.com/.default"
Note: Replace the placeholders in the command with your actual values.