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

Azure Functions 2.0 with Service Principal appRoles #2026

Open
eaidland opened this issue Nov 20, 2018 · 1 comment
Open

Azure Functions 2.0 with Service Principal appRoles #2026

eaidland opened this issue Nov 20, 2018 · 1 comment

Comments

@eaidland
Copy link

Hi!

Current setup;
Azure functions v2 (HttpTrigger)
.Net Core 2.1
EasyAuth
Service Principal with appRoles

I couldn't find anything about this in the wiki. My goal is to have authorization on different APIs based on appRoles (Admin, Read, Write, ReadAll etc). Is it possible to have authentication attributes with AF2? How can one utilize the appRoles in AF2?

[Authorize(Roles = "Read")]
 [FunctionName("ReadFoo")]

Any tips, documentation would be appreciate.

@ghowlett2020
Copy link

A ClaimsPrinciple can be injected into your function....you can then check the users claims.

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

2 participants