web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Redirect on Sign in Page in Dynamics 365 Portal

(0) ShareShare
ReportReport
Posted on by 373

Hi,

I want to open Sign In Page directly, when any one hit the Portal URL. 

Can we redirect Home page on Sign-In page?

Can we applied any other approach for that?

Please suggest me good solution?

Thanks!

I have the same question (0)
  • Verified answer
    LeoAlt Profile Picture
    16,331 Moderator on at

    Hi Partner,

    You could add custom JS code in Home webpage to do this.

    Please refer to the following steps.

    1.Go to Dynamics 365 Portal Management and find your Home web page for your website.

    pastedimage1600653412575v1.png

    2.Open the record and in "Localized Content" session, open the "Home" record again.

    pastedimage1600653476555v2.png

    3.In "Advanced" tab, use the following JS code.

    pastedimage1600653520908v3.png

    $(function () {
        var url = document.location.toString();
        var arrUrl = url.split("//");
        var start = arrUrl[1].indexOf("/");
        var relUrl = arrUrl[1].substring(start 1,start 7);
        if(relUrl==null||relUrl==""||relUrl==undefined||relUrl!="SignIn"){
            window.location.href="SignIn";
        }
    })

    Save and wait the settings sync to Portal.

    Then when you go to the portal URL directly, the page will be redirected to SignIn page as you wish.

    Regards,

    Leo

  • Suggested answer
    Pankaj Gogoi Profile Picture
    3,177 on at

    Hi Cristina,

    When you are redirecting user from homepage to sign in page, what happens when they sign in. They will again be redirected to the sign in page. I think for first time user it will be the profile page after they sign in. Probably, you need to place a condition if the user is not signed in then redirect.

    Best Regards

    PG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 47 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

#3
Pallavi Phade Profile Picture

Pallavi Phade 32

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans