This question go an answer on Stack Overflow: https://stackoverflow.com/questions/68064936/setting-additionalloginparams-with-auth-v2
Authenticating backend user through frontend
I've struggled a while to access my backend app service from my frontend app service. I've followed this guide but I use Node backend and React frontend. However I'm unable to perform the step Configure App Service to return a usable access token. I get the error "Cannot execute the request for site x because the site is running on auth version v2."
. To handle this I tried updating the sheet authsettingsV2, and I believe I found that the property properties.identityProviders.azureActiveDirectory.login.loginParameters
in v2 equals properties.additionalLoginParams
in v1 as setting this v2 property according to the tutorial shows the desired setting in the v1 authsettings sheet.
However accessing my frontend app with this setting I get the error AADSTS901002: The 'resource' request parameter is not supported. before even being able to enter my credentials.
I've also tried without the additionalLoginParams
setting completely, this gives me the error {"code":401,"message":"IDX10511: Signature validation failed. Keys tried: '[PII is hidden]'. \nkid: '[PII is hidden]'. \nExceptions caught:\n '[PII is hidden]'.\ntoken: '[PII is hidden]'."}
on the API call, and upon inspecting my token, I find that the audience is the Microsoft Graph API. But I guess that is expected in this setting.
How can I proceed to enable access to my backend app? / How do I set the additionalLoginParams
in auth version v2?