30
Views
3
Comments
Solved
[IdP] How to check roles when we implement SSO using IDP component.
idp
Web icon
Forge asset by João Barata
Application Type
Reactive

Hi Everyone,

We have implemented SSO using IDP component in our demo application. When user will try to access the URL then it is authenticating by Microsoft Azure AD and after the successful authentication user is redirected on the default dashboard homepage. Our demo application having multiple screens and after login based on user role users will be redirected to the respective page.

1)After the successful authentication of user by Azure Ad before redirected on the screen how can I check the user role ?

2) How can I get the UserId or Username after the succesful authentication ?


Please suggest your thoughts on the same.

Thanks in advance.

2024-09-17 12-24-07
Rammurthy Naidu Boddu
Champion
Solution

Hi @Ajit Kurane

In IDP, if the details of the user, userId, role in Microsoft Azure AD DB, so that while connecting with them we also have an option to map the cliams details. you have to map the cliams details properly and Microsoft Azure AD DB also returning the data so that all the information get from claims. 


2025-04-17 05-42-16
Ajit Kurane

Hi Rammurthy,

Thanks for the reply.

IDP component having GetCurrentClaims client action.

In which place exactly I need to use it in the login flow to redirect the current user on the respective dashboard based on his User Role.


Thanks.



2021-11-19 11-12-44
Rui Mendes

Hello @Ajit Kurane,

For the user ID, you can use the GetUserId() function, and for the userName, you have the clientVariable. 

For roles, you can use the CheckRegisteredRole and HasRole functions. 

If this response solves your issue, please mark it as the solution so others with the same problem can benefit.

2024-09-17 12-24-07
Rammurthy Naidu Boddu
Champion
Solution

Hi @Ajit Kurane

In IDP, if the details of the user, userId, role in Microsoft Azure AD DB, so that while connecting with them we also have an option to map the cliams details. you have to map the cliams details properly and Microsoft Azure AD DB also returning the data so that all the information get from claims. 


2025-04-17 05-42-16
Ajit Kurane

Hi Rammurthy,

Thanks for the reply.

IDP component having GetCurrentClaims client action.

In which place exactly I need to use it in the login flow to redirect the current user on the respective dashboard based on his User Role.


Thanks.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.