I created a new web application and chose organizational as authentication type. I have the app tied to my office 365 account. In azure I was able to create roles and able to assign to users. My question is how do I allow my web application to take advantage of these roles either using controller annotation (eg Authorize(Role=admin)) or using the method User.IsInRole()?
I use controller annotation, but for individual accounts with roles. I guess it's the same for organizational accounts. The benefit from using authorize attribute is that the attribute can be added for whole controller, unlike User.IsInRole() in every action.
Authorize attribute example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With