AzureFunctions.Extensions.OpenIDConnect
AzureFunctions.Extensions.OpenIDConnect copied to clipboard
Microsoft.AspNetCore.Authorization: No policy found: AuthLevelAdmin
When I try to run the sample "InProcess-Net6" project using launch settings "Attach to .NET Functions", I get the host error: Microsoft.AspNetCore.Authorization: No policy found: AuthLevelAdmin
[2022-11-15T22:11:43.696Z] Executing HTTP request: {
[2022-11-15T22:11:43.699Z] requestId: "1c2351ce-8c3d-4144-8135-eac9a9150059",
[2022-11-15T22:11:43.700Z] method: "GET",
[2022-11-15T22:11:43.701Z] userAgent: "ms-rest-js/2.6.0 Node/v16.14.2 OS/(x64-Windows_NT-10.0.19044) vscode-azurefunctions/1.8.3",
[2022-11-15T22:11:43.702Z] uri: "/admin/host/status"
[2022-11-15T22:11:43.703Z] }
[2022-11-15T22:11:43.707Z] An unhandled host error has occurred.
[2022-11-15T22:11:43.708Z] Microsoft.AspNetCore.Authorization: No policy found: AuthLevelAdmin.
[2022-11-15T22:11:43.709Z] Executed HTTP request: {
[2022-11-15T22:11:43.709Z] requestId: "1c2351ce-8c3d-4144-8135-eac9a9150059",
[2022-11-15T22:11:43.710Z] identities: "(WebJobsAuthLevel:Admin, WebJobsAuthLevel:Admin)",
[2022-11-15T22:11:43.711Z] status: "500",
[2022-11-15T22:11:43.712Z] duration: "12"
[2022-11-15T22:11:43.712Z] }
and the function doesn't start. Do you have an idea what is the cause of the issue, and how to fix it?