How to check user account exist in "User" entity after authenticating SAML successful

I have already configured to use SAML Authentication. How can i check the user account exist in "User" entity? It seems to bypass the "User" entity anymore.


In my case, user have valid account in SAML but no account in outsystems. Then, i want to deny his/her access in my application.

Hi Jessica,

Are you using manual process for checking User.?

Than you can do one thing before "dologin" Process write your custom code to check users entity to check user entry in this entity if this have entry in this table that mean you will check with SAML other wise redirect to custom error or not access this site page (deny his/her access in  application.)


Hope this will help you.

Regards

Rahul Sahu

hmmm...i am using SAML 2.0 authentication in the Users application.


Can i go on doing custom code before 'dologin' process?

Hi Jessica,

Yes you can with same code we discuss on this

https://www.outsystems.com/forums/discussion/59564/how-to-enable-saml-authentication-for-some-applications-only/.

But On Users module you have to set Authentication - Internal Only.


Regards

Rahul Sahu

Thank for your suggestion.

However, my case need work in the below sequence.

1. authentication with identity provider via SAML firstly. 

2. After it is valid, check the user account present in the user entity or not.

Any ideas?


HI Jessica,

If you do, Users module to set Authentication - SAML.

than user first authenticate SAML if valid than user create in users entity after user login. this is Outsystem process.

In Your case, user already present in Users entity you want check authentication only from SAML.

=>. create you extention for SAML authentication - check if true than check User entity - if true than login else raise exception .

=> also you can modify User module for this but its not recommendate.


Regards

Rahul Sahu

Thank Rahal.

The steps are as below. is it right?

1. in Users module to set "internal only"

2. create the extention for SAML authentication such as idpconnect

3. where should i implement codes to check of 'User' entity???

Solution

Hi Jessica,

Create a common code for all application.

1. create a application Like name Authunetication-

2. add emplty module and create server action for Authentication

3. use this code in which application where you want this type authentication. In login action in login screen

all application have Serveraction like below image


Modify your code in accordingly.


Hope this will help you.

Regards

Rahul Sahu

Solution

Million Thanks for your help.