How or where can I check if the logged-in user is authenticated on Outsystems or in an external DB?

Hey Biginner,

I'm not sure if I understood right, but you should do that in OutSystems.

Can you say what is your user case?

What you need to do?

It has lots of ways to do that, if you want to know if it is just logged you can see if the username Session/Client var is not empty for example:

This would be the simpler way I believe. But not so safe.

Another way is to check the UserId is not null also:

It is safer, but will go to the DataBase to check


Why you ask?

If you used external authentication via the Users module, then a user is always authenticated externally.

If  you are ntegrating an external authentication provider by using an forge components then you can figure this out by logging the authentication. 

In the end in all situations the user will always be logged in via an OutSystems user, after authentication with the external system was successful.



Hi Beginner,

Its up to you what mechanism you want to use to authenticate your user , Outsystems allows you to either use the default platform authentication mechanism or you can use any external authentication mechanism for your user.

And as Daniel mentioned even when you use external authentication , in order to initiate the user session a silent login to OS will be require and there are actions available to do it without password.

Now my question here is what exactly you are trying to achieve or what your specific business case here? If you have mixed authentication for different users than you extend the User entity and keep some information about Users like Authentication Type .



Hi Biginner,

A logged-in user authenticated via OutSystems own authentication mechanism will have a password, whereas if you use one of the built-in external authentication mechanisms like LDAP, AD, SAML 2.0/Azure AD/Okta (configured in the Users application), those would not store that information in the User entity (and would likely assign a value to the External_Id property).

Hope this helps!

Hi Biginner

In addition all of the above answers, You can visit below link where you can find all documentation and authentication practices in single place.

   --   Authentication 



Hi Biginner,

End user Authentication can be internal or through AD / SAML / LDAP. Configuration of authentication can be set in Users Module in "Configure Authentication" section.

If the configuration is AD/SAML , end user is navigated to the SAML authentication page. If the authentication is internal, user is navigated to the login.aspx - landing page of application.



Biginner wrote:

How or where can I check if the logged-in user is authenticated on Outsystems or in an external DB?

Meanwhile I stumbled over the classic User_IsExternalUser action that you can use to check just that. It should work for all Users-based authentication mechanisms.

Hope this helps!


A lot of different answers for different problems where given in this thread, that may be a solution for your needs or not.

If none of them helped and you still need more info, try to tell us your specific user case.

This way I'm sure that we will help you in a better way :)

Cheers and Regards,

RR :)