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 Platform Community / Forums / Power Pages / Auto Sign Out after re...
Power Pages
Answered

Auto Sign Out after register in Power Pages

(0) ShareShare
ReportReport
Posted on by 54

Hi All,

 

I have this requirement that i want to build in the power pages using Azure B2C.

1. User register first time will have status inactive and requires approval.

2. After user register, user will automatically logged out. and won't allowed to sign-in until he/she is approved by administrator.

 

the 1st point i have achieved it successfully, but the 2nd point, i have no clue on how make it.

because by default, user register in power pages will be signed in when successfully registered.

Do you guys have any idea/suggestion on what should i do?

 

Thanks

Categories:
I have the same question (0)
  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @haryadihart 

     

    Did you apply web roles and web page access control rules to all your pages?  

     

    Delete the default web page access control rules ( Grant access and Grant Change)  

    ragavanrajan_0-1696844121539.png

    Thinking out loud.

    If web pages are controlled by web page access control rules, what is the problem in accessing the profile page? 

    I will also tag Power Pages experts here for their suggestions @Fubar @OOlashyn  @Lucas001 

     

    Hope it helps.
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

     

  • Verified answer
    Lucas001 Profile Picture
    2,563 Super User 2026 Season 1 on at

    Hi @haryadihart,

     

    Is there a specific reason people need to be signed out?

    If you already know who will register and depending on what info you need from them (Adress, Name, Banking etc.) it would probably be more effective to hand out invitation codes and let those users join your power page).

     

    On the other hand an approach would be to use JS in combination with a support column for your profile web form.

    Set that column to "no" if the user is not properly registered. Use JS to run the function which is necessary to log out the user if the column is "no". Once you confirm the user set the column to yes. Keep in mind the chache can take some time till the column value is changed on the page. Hide that column in your form as the user does not need to see it.

    --------------------------------------------------------------------------------------

    Hope that helps.

    If the post solves your problem, please mark it as solution. If it helps, consider a thumbs up.

  • Verified answer
    Fubar Profile Picture
    8,501 Super User 2026 Season 1 on at

    Generally, I would not log them out.

    • You can limit what someone can do by a restrictive Authenticated Web Role, and then assign them a more powerful Web Role when approved
    • The Contact record also has a field "Login Enabled" that you may also be able to make use of.
    • You can also think about the actual registration process, eg. you could have them initially fill in some info into the Lead table or a custom table, then approve it, and on approval send them an Invitation (in this scenario you would disable open registration)
  • Verified answer
    OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    @haryadihart I've done something similar and would advise you not to logout users and instead create an application form in Portal that allows them to submit their data, create them in Azure AD B2C (and set force password change) so if approved when they go through the login process it will force them to change password the first time. 

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 36

#2
Valantis Profile Picture

Valantis 32

#3
omkarsupreme Profile Picture

omkarsupreme 25

Last 30 days Overall leaderboard