Open munkii opened 2 years ago
Thanks to this issue report https://github.com/AzureAD/microsoft-identity-web/issues/379#issuecomment-666526566 and comment from Jean-Marc and now know that ot was a value in secrets.json that was overriding my config.
Is there no way to detect that the AzureAd:ClientSecret value is double configured when this exception case happens and flag in the Exception report?
Thanks for the suggestion of detecting this case, @munkii
Which version of Microsoft Identity Web are you using? Microsoft Identity Web 1.24.1
Where is the issue?
Is this a new or an existing app? This is a new app or an experiment.
Repro
Azure Function v3 trying to call one of our protected ASP.NET Web APIs
The configuration for the Azure Funciton is in local.settings.json
I am trying to call the protected api from the Azure Function. I have configured the protected API so that it has an AppRole. I then configure the Azure Function in Azure AD so that it has an API permission to that AppRole.
When I am ready to call the protected WebAPi i run the follwoing code in the AzureFunction to get a token.
Expected behavior I expect to get an AccessToken
Actual behavior I get the following error
I have checked and the secret that is configured at AzureAd:ClientSecret in local.settings.json is correct
I have also asked about this is on StackOverflow but have gotten no replies, https://stackoverflow.com/questions/72000639/securing-aspnet-core-web-api-for-calls-from-azure-function
Possible solution
Additional context / logs / screenshots / link to code
Add any other context about the problem here, such as logs and screenshots, or even links to code.