Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.AspNetCore.Authorization: No policy found: AuthLevelAdmin #24

Open
JakubRupniewski opened this issue Nov 15, 2022 · 0 comments

Comments

@JakubRupniewski
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant