cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anhhd
Helper II
Helper II

How to get last login on portal

I'm used Authentication/LoginTrackingEnabled but it didn't work.

Is there any other way to get login time information?

3 REPLIES 3
v-albai-msft
Community Support
Community Support

Hi @anhhd ,

The login tracking feature has been deprecated(mentioned in Audit logging section). 

It is recommended to use an analytics technology like Azure Application Insights to capture this kind of information. To setup Azure Application Insights for web applications, refer to this article to find the details on how to set it up and obtain a JavaScript code snippet.

Once the JavaScript code snippet is obtained, it can be added to the Page Tracking content snippet available in your portal configurations or added to the Header web template to capture standard events. To capture information like contact records related to user, refer to custom event support of Azure Application Insights as described here.

Reference:

https://cloudblogs.microsoft.com/dynamics365/it/2018/03/20/portal-capabilities-for-dynamics-365-depr... 

Best regards,

Allen

anhhd
Helper II
Helper II

@v-albai-msft thank for your help,

After successful login, the login time information will be saved to the table
Then display the information on the portal for each user.
The above requirement I find using Azure Application Insights is not very reasonable.
I plan to use flow so that after login will save the login time information to the table. (use sessionStorage to mark the time after successful login, after logout will delete this sessionStorage)

Hi @anhhd ,

Yes, the final method to be used will depend on your actual needs. At least for your needs, Flow is perfectly enough.

Best regards,

Allen

Helpful resources

Announcements
Carousel Community Blog

Check out the Community Blog

Read all about the most recent blogs in the community!

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Users online (2,922)