research Question

How can a .NET app from Azure differentiate users?

Avatar of Babak Sekandari
Babak SekandariFlag for United States of America asked on
.NET Programming* multi-factor authenticationAzure
2 Comments1 Solution15 ViewsLast Modified:
I’m building a Leave Request system.
The code was originally downloaded from MS Azure with the ability for 2 factor authentication and I'm adding to that Azure machine generated code.
I got the code from the Quickstart section of my application in Azure ( Quickstart: ASP.NET web app that signs in Azure AD users). In step 2, Azure allows you to download the project with a button to download the code sample which is configured and ready to run.
I want to be able to differentiate users whether they are employees, supervisors, human resources employee, or human resources supervisor. That might change. The point is, I need to display different functionality for different positions.
The way I’m thinking about it now is to get the user (something like User.Identity.Name) and then look them up in Active Directory or Azure AD and then based on whatever attributes I’m looking for, add however many conditional statements to present the required functionality.
However, that seems like a brute-force, old-fashioned way of doing it. It seems like .NET would already have a way built-in to deal with that sort of thing but when I search, nothing relevant comes up (or maybe it was relevant and I misunderstood.)
So, is there any built-in way that .NET can differentiate functionality based on user attributes, or do I need to implement that brute-force approach? How is this best done?
Thanks
ASKER CERTIFIED SOLUTION
Chinmay Patel
Chief Technology Ninja
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 2 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 2 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004