I am trying to authenticate to https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token
where tenantId is coming from Azure AD.
It works fine as long as I pass only one scope in the following format
api://{{clientId}}/.default
If I pass multiple values to the scope paramter, it fails with error AADSTS70011: The provided request must include a 'scope' input parameter. The provided value for the input parameter 'scope' is not valid.
I've tried separating the values with a space, a comma and a plus sign. But it never works; If I pass any value individually they all work but I want multiple audiences in my access token, so how can I do that ?
EDIT
extra parameters passed :
grant_type : client_credentials
client_id
client_secret
scope