diff --git a/packages/cli/src/sso/saml/routes/saml.controller.ee.ts b/packages/cli/src/sso/saml/routes/saml.controller.ee.ts index 232020b5945f9..c6b04cae460ef 100644 --- a/packages/cli/src/sso/saml/routes/saml.controller.ee.ts +++ b/packages/cli/src/sso/saml/routes/saml.controller.ee.ts @@ -1,4 +1,5 @@ import express from 'express'; +import { getInstanceBaseUrl } from '@/UserManagement/UserManagementHelper'; import { Authorized, Get, Post, RestController } from '@/decorators'; import { SamlUrls } from '../constants'; import { @@ -125,9 +126,9 @@ export class SamlController { if (isSamlLicensedAndEnabled()) { await issueCookie(res, loginResult.authenticatedUser); if (loginResult.onboardingRequired) { - return res.redirect(SamlUrls.samlOnboarding); + return res.redirect(getInstanceBaseUrl() + SamlUrls.samlOnboarding); } else { - return res.redirect(SamlUrls.defaultRedirect); + return res.redirect(getInstanceBaseUrl() + SamlUrls.defaultRedirect); } } else { return res.status(202).send(loginResult.attributes);