Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
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:
  • Lucas001 Profile Picture
    2,174 Super User 2025 Season 1 on at
    Re: Restrict Portal Login From Multiple Device

    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.

  • rahulahire Profile Picture
    6 on at
    Re: Restrict Portal Login From Multiple Device

    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,174 Super User 2025 Season 1 on at
    Re: Restrict Portal Login From Multiple Device

    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.

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >