Hello,
we have requirement to process the currently singed in users in portal. ayn idea how to get all the users which are currently logged in? or how to identify if particular contact is currently logged in or not ?
thanks!
Hi
My first guess here would be using the last successful sign-in field from the contact records
This way you would have both sign-in datetime and sign-out datetime.. now you can retrieve logged-in users
I haven't done this myself, but should work
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Power Apps Portals Super User
Hi @PoojaD,
As Oliver mentioned, Login Tracking is the simplest approach within CDS, but this field is deprecated (https://docs.microsoft.com/en-us/powerapps/maker/portals/faq#login-tracking-enabled) and not recommended for use - Microsoft's recommendation is to utilize an insights/analytics service. Even still, you will need to define what is considered "currently signed in" - is it someone who last logged in 30 mins or less (using login tracking) or last visited a page 30 seconds or less ago (using insights)?
What is the purpose of the request?
You can use {% user.contact %} to get current contact information and onload of the home page call a power automate with pot request, where you will store data about logged in user
thanks Justin, basically my requirement to maintain track of contact logged in currently . suppose 5 users are logged in and working on portal, if 6th person comes and try to login to portal, he should able to access features of portal . if one person is logged out from currently 5 , then 6th person can log in.
@eliz_talent, thanks. Can you please help me with understanding pot request. how to call that from portal page load.
thanks in adavance
Hi @PoojaD,
Based on your information, I don't suggest using PowerApps Portals. What you are asking will require server-side management that you won't find availability for. Even if you use Oliver's recommendation to identify the number of users currently "logged in", preventing a login (especially dependent on your authentication approach) is going to be a nightmare, if even possible. Multiple concerns for this request:
Not expecting answers to these, just trying to present concerns I have for the approach. I'd recommend a fully custom application.
User | Count |
---|---|
9 | |
6 | |
5 | |
4 | |
2 |
User | Count |
---|---|
21 | |
19 | |
18 | |
10 | |
4 |