How to get the user activity logs for applications connected with Entra ID?

Pratham Jagga 0 Reputation points
2025-01-02T12:18:32.2233333+00:00

I am able to retrieve the last sign in times for applications for each user in my entra id using audit logs from the graph api, but can't find the logs of users's activity.

Note that I am already able to retrieve the sign in logs using

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,871 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshu katara 12,965 Reputation points
    2025-01-02T12:33:08.01+00:00

    Hello Pratham , Welcome to MS Q&A

    To retrieve user activity logs in Microsoft Entra ID using the Graph API, you can use the following query

    GET https://graph.microsoft.com/v1.0/auditLogs/signIns
    
    
    
    

    This query will return the sign-in logs for users. If you need to filter the logs for specific activities, you can add query parameters. For example, to filter logs for a specific user, you can use:

    GET https://graph.microsoft.com/v1.0/auditLogs/signIns?$filter=userPrincipalName eq 'user@example.com'
    
    
    

    To execute this query, you can use tools like Microsoft Graph Explorer or any HTTP client.

    For more detailed instructions and examples, you can refer to the Microsoft documentation on accessing activity logs through the Microsoft Graph API:

    These resources provide comprehensive guidance on how to construct and execute queries to retrieve user activity logs.

    Pls let me know if you have any questions

    Kindly accept answer if it helps

    Thanks
    Deepanshu


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.