Capture User’s Last Successful Login with Portal Web API
Hey Power Pages developers! Are you sitting there scratching your head wondering why the Authentication/LoginTrackingEanbled site setting isn’t working? Unfortunately it has been deprecated 😭😭😭😭. This saddened me a lot because I utilize the Last Successful Login date field on the Contact table for a lot of reporting and automation using Power Automate. In this article I will demonstrate how you can use the Portal WebAPI with a little Javascript/Liquid to populate that field. Before we dive in, here are a few other options you might consider: Power Automate: Use a Flow to capture the data, a good example of how to implement can be found here: Last Successful Login on Contact record by Prasad Motupalli . The one thing this was missing for me though was security which could be a concern with the http trigger not requiring authentication. I want to be sure that the person updating the data is an authenticated user. Application Insights: You can track additional details su...