What's the optimal logout flow for an App that uses User Module and Azure AD auth?
Application Type
Traditional Web

My app uses Users module (username, password) and Azure AD (Using IDP Connector) for the authentication to my app

Login screen:

I have no problem with the login flow of my app, but for logout, I have to either use the User_Logout action or the IDP_SingleLogout_URL depending on what authentication did the user come from.

I made a temporary solution to check the Users table if the User has a password value, since for some reason I noticed that a user from Azure AD does not have password stored in that table. But I'm pretty sure this is not the proper way to deal with this.

How do I check what auth did User used or are there even other ways to do this?

My current logout flow:

Hi @ars art ,

Maybe you can try something like GetUserId() = NullIdentifier() in the "NoPassword" if widget. 

Maybe this might help.



I think relying on whether password attribute is empty or not is not a good idea because looking at your login screen even the users who does have the password in Users entity can opt for SSO. In this case you will end up using the User_Logout flow whereas you should have followed the Idp_Single_Logout flow

You should be able to identify the login mechanism in the login logic itself, since OutSystems login and login via identity provider are two different flows.

You can maintain login flow information in session since yours is a traditional web app, and then based on the session value you decide the logout flow.

Hope it helps!


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