TinyBlazorAdmin icon indicating copy to clipboard operation
TinyBlazorAdmin copied to clipboard

Having trouble accessing UrlList API request

Open Rcatalfu opened this issue 4 years ago • 3 comments

Hi, When I try to deploy this on Azure, it successfully deploys, but I had to follow a slightly different process due to using two different tenants - one for Azure and one for Azure Active Directory. I couldn't use Express deployment. My issue comes when I login - I am getting a 400 Bad Request with one of the POST requests - the one to get an OAuth2 token. The token scope is attempting to get a scope of https://shortenertoolsdl6rq.azurewebsites.netuser_impersonation. It doesn't add the '/' needed in this scope to allow it to work. I could get around this by modifying the Program.cs and AzFuncAuthorizationMessageHandler.cs file. I then faced a 401 Not Authorized from UrlList. This seems to be due to the destination being the frontend? Can you please help to provide guidance? This might be something easy I missed (I am in school studying Computer Science, so I thought this might be a fun program to try to deploy to learn more on Azure). Thank you! Ryan

Rcatalfu avatar Apr 03 '21 20:04 Rcatalfu

In src/TinyBlazorAdmin/wwwroot/appsettings.json you have

[...]
  "UrlShortenerSecuredService": {
    "Endpoint": "https://shortenertoolsdl6rq.azurewebsites.net"
  },
[...]

It needs to be

[...]
  "UrlShortenerSecuredService": {
    "Endpoint": "https://shortenertoolsdl6rq.azurewebsites.net/"
  },
[...]

with the slash on the end, as per the docs ;)

neggles avatar Apr 28 '21 08:04 neggles

same problem form me, Endpoint already has h=the slash charcter.

cryongen avatar Sep 20 '21 16:09 cryongen

Try again with v3 it should be fixed.

fboucher avatar Nov 25 '22 19:11 fboucher