Efficiency of logging users with Azure AD, and extract data from Microsoft Graph

OdMa 0 Reputation points
2023-03-27T12:19:03.2133333+00:00

I am building for a specific company a login system by a Microsoft user. After connecting the user, I need to extract data about him to know what permissions I can give him, and for this I use Microsoft Graph.

I am currently making a login with a Microsoft account using the Azure AD, and then the window opens where they receive the authorization code, which the user must enter in another window so that I can extract the data from the Microsoft Graph - in terms of user experience, this is a very long login And complicated, so I ask if there is an easier way to carry out this process?

This is the code that contains the login and logout functions of users connecting with a Microsoft account:
User's image

This is the code that contains the extract user data with Microsoft Graph:
User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,308 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,172 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.