Skip to main content

Notifications

Power Pages - Power Apps Portals
Answered

enable search post authentication

Posted on by 77

How to enable search after authentication?

 

I have enabled search in site setting son our DEV environment which enables search in the header on home page.  I can utilise search before authentication and when I click on a link in the search results, I can get straight to the web page without logging in and being authenticated.

 

How can I enable search on the post authentication home page or have the user pushed to login authentication when I click on the 'search' icon?

  • DarrenPlant Profile Picture
    DarrenPlant 77 on at
    Re: enable search post authentication

    Hi @OOlashyn thanks for your valuable input here.  I have quickly tested by assigning authenticated user web role to certain pages and they now fail to appear in the search results.  I think this is good enough for my needs.  I will ensure web role is assigned to all pages and therefore search will show no results for a user that has not logged in.

  • Verified answer
    OOlashyn Profile Picture
    OOlashyn 3,498 on at
    Re: enable search post authentication

    Hi @DarrenPlant ,

    You can do several things. First, you can hide the search completely from anonymous users. For that, you would need to modify the header template to wrap the search part into if user expression to show it only to authenticated users. Another approach if you still want to show the search bar to everyone is to use Website Access Control Rules (see official doc here). Using them you can restrict some pages of your portal to be accessible only for a selected list of web roles. So if the anonymous user will try to access them portal will redirect it to sign-in page to make sure that the user has proper access. However, I am not totally sure if a page with enabled Access Control Rule will even show in the search.

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,473

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,659

Leaderboard