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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Pages
Unanswered

Portal Enable Login

(0) ShareShare
ReportReport
Posted on by 68

Hi,

 

I am new to portals. I am trying to setup authentication for portal only for contacts. I have enabled the site settings for authentication but my portal still not prompting for the login instead it directly goes to the home page without requiring for login. The portal is anonymous. How to enable the login authentication? Please help.

 

Thanks.

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @alwaysjai :
    You can set these web pages' visibility by setting the Permissions property of them.

    v-bofeng-msft_0-1622441855612.png

    I think this link will help you a lot:

    Manage page permissions

    Best Regards,

    Bof

     

  • oliver.rodrigues Profile Picture
    9,449 Most Valuable Professional on at

    see if the above configuration solves the problem, just so we know.. what happens if you force on the browser the portals URL + /SignIn ... does this get redirected to the home page, is that the case?

  • Jayakumar Profile Picture
    68 on at

    Ok thank you for the reply. I will make this change and try

  • Zak Bird Profile Picture
    4 on at

    Hi @alwaysjai


    Correct me if I'm interpreting wrongly, but you'd like to force anonymous users to the sign-in page? 

     

    You can create, a Web Page Access Control Rule, and call it e.g. 'Unauthenticated Users restriction'. From there, select Home as the Web Page, the correct Website, and the Right of Restrict Read. Also, the Scope as 'Exclude Direct Child Web Files', this will ensure your CSS still loads on the page. As Home is the main page, all child pages will inherit this Control Rule. This should do the job.

    In addition, to force users not signed in to your sign-in page, you can create a new Web Template e.g. 'Home Redirect' and add this code: 

     

    {% if user %}

    {% else %}

      <script>

        window.location.replace('/SignIn?ReturnUrl=/');

      </script>

    {% endif %}

    Then, save this Web template and include it in your Home Web Template, by adding the line: 

     

    {% include "Home Redirect" %}

     

    A combination of these two suggestions, will effectively bulletproof your portal from anonymous users, I believe. 

     

     

  • Jayakumar Profile Picture
    68 on at

    Thank you Zbird94. Let me try and get back to you of needed. Thanks a lot.

  • Jayakumar Profile Picture
    68 on at

    Thanks for helping.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
DP_Prabh Profile Picture

DP_Prabh 51

#2
rezarizvii Profile Picture

rezarizvii 35

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 33 Most Valuable Professional

Last 30 days Overall leaderboard