Posts

Last logged in Capture B2C Authentication in Portal Custom Code

Image
Portal Last logged in B2C Authentication page The Last Successful Login field on the Contact record has stopped updating.  It may be version related - the portals on 9.3.4 don't work whereas those on 9.3.3. do work. I understand that this feature is deprecated and should be replaced with Azure Application Insights. B2C Authentication: - Azure Active Directory B2C (Azure AD B2C) is a cloud identity management solution for web and mobile apps. The service provides authentication for apps hosted in the cloud and on-premises. Authentication types include  individual accounts, social network accounts, and federated enterprise accounts. If your portal is configured with Azure B2C Authentication for this I have implemented the functionality by adding jQuery code  and calling Power Automate   Flow in the Header web template  to update the Last Login field to (almost) replicate the old behavior.   Step 1: In the Header web template add below scri...

Last Successful Login on Contact record - PowerApps Portal Custom Code

Image
Updating the Last Successful Portal Login on Contact record by using Custom Code   I understand that this feature is deprecated and should be replaced with Azure Application Insights. However, we still require the ability to search by Last Login date using Advanced Find (e.g., "look for contacts where last login is today"). This worked well with the now deprecated feature but (I think) can't be done using Application Insights because the data isn't stored on the contact record.   I have implemented the functionality by using the  Portals Content snippet  to add  jQuery code  and calling Power Automate   Flow in the Portal Sign-in Page to update the Last Login field to (almost) replicate the old behavior.     How it works :                  In the below content snippet code, we will get username which user enters in the textbox and after clicking on sign in button then i...