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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Restrict Portal Login ...
Power Pages
Unanswered

Restrict Portal Login From Multiple Device

(0) ShareShare
ReportReport
Posted on by 6

Hi Community,

 

Trust you all are doing great!

 

I am working on power portal with Azure B2C as external authentication. We have one requirement where we need to restrict the user/contact to login to Portal from multiple device. (fyi..We are using custom policy for Azure B2C)

 

Any suggestions on this would be really appreciated.

Categories:
I have the same question (0)
  • Lucas001 Profile Picture
    2,434 Super User 2025 Season 2 on at

    Hi @rahulahire,

     

    this is a suggestion which just came into my mind.

    You could use a power automate workflow and write into a column once somebody logs in, seeing if the value of the column is 1 or "loggedIn" or something like that. Send the response back to PowerPages as response. If true log out the user.

    If somebody is loggin out you will need to reset the column as well.

     

    One thing to keep in mind if this is a security issue for you - people could block that specific code execution on your page and still be logged in on multiple devices.



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

    Hope that helps.

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

     

  • rahulahire Profile Picture
    6 on at

    Hi @Lucas001,

    Thank you very much for your response.

    I also discussed the same solution with my team but as you said rightly security is the main concern and we are worried if we implement this solution it may get rejected during security testing.

     

    Considering we are using Azure B2C as external authentication, if you have any other suggestion/solution please do let me know.

  • Lucas001 Profile Picture
    2,434 Super User 2025 Season 2 on at

    Hi @rahulahire,

     

    the problem is that in any way you have to execute the JS code on your client as they need to check if they are already logged in.

    One thing you could do is take the approach from the other end. Hide your page or if necessary all your pages with and only show the content when javascript is enabled. For example with the jQuery .show, .append or similar things, loading the content from dataverse. Set a column in dataverse to a value with Power Automate and respond with is true to let the page load. If the value is for example 0 instead of 1 don't load it. You could use another PowerAutomate Flow once somebody logs in to check the value and if he already is logged in, log him out again.

     

    It's a lot of workarounds in the end and performance is something what need to be considered in that case. Maybe it's worth a try.



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

    Hope that helps.

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 78 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard