'Powershell: Get-MsalToken error AADSTS7000218

Running the following Powershell command

$tokenresponse = Get-MsalToken -ClientId $clientID -TenantId $tenantID -Interactive  -RedirectUri "http://localhost"

gives me the error:

AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.

All solutions I found are pointing to the direction, that in the Azure Protal I should enable "Allow public client flows" but this setting is enabled. Any idea how I can get the token (I would need to get a token for delegated permissions)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source