0

I'm very new to .net. I've started to integrate MSAL and getting an error: AADSTS70011: The provided request must include a 'scope' input parameter. The provided value for the input parameter 'scope' is not valid. The scope https://dev.test.com/myapi/.default https://dev.test.com/myapi/my.app-v1.all is not valid.

I am adding 2 scopes. I've shown an image of my code enter image description here

string ResourceId = "https://dev.test.com/myapi/";
var scopes = new[] { ResourceId + ".default", ResourceId + "scope2" };
var app = ConfidentialClientApplicationBuilder
.Create(clientId)
.WithTenantId(tenant)
.WithClientSecret(secret)
.WithAuthority(authority)
.WithRedirectUri(redirectUri)
.Build();

if I remove scope2 and leave .default I get a token. But scope2 is what is mapped to my resource APIS

0 Answers0