Azure Single Sign On integration

Hi Support Team,

I want to integrate Cuba Platform Application with Azure AD for SSO solutions.

Please let me know if it’s possible and if yes do we have any instruction for it?


Hi Dong,

Any SSO solution for CUBA applications can be implemented using the combination of HttpRequestFilter bean and AppStartedEvent listener described in Web Login document.

In the filter, you can do the authentication and then invoke chain.doFilter() with a HttpServletRequestWrapper containing some authenticated principal. In AppStartedEvent listener, you can get the principal from the request object (using RequestContext.get().getRequest().getUserPrincipal()) and perform login with ExternalUserCredentials(userLogin).

We will include more detailed instructions to the documentation in the near future.


1 Like

Thank for the response Konstantin.

If I implement the filter, so the system still using login page of Cuba or login page of Microsoft? As I know if we perform External authentication that process still use Cuba Login Page.
Please help correct me If I wrong here.


In the Filter+ AppStartedEvent listener approach, you can bypass CUBA login page if the listener will perform login right away. The application will switch to the main page after connection.login().

Hi Konstantin,

Could you have a complete sample for integrate CUBA with Azure?

Hung Vu

Hi Hung Vu,

We’ll try to make an example and let you know when it’s ready.

For future reference: this guide contains some examples of login customization (e.g. see OAuth Web Flow)