How to get Azure AD Sign-in logs by Python

RK 1 Reputation point

Hi I want to retrieve Azure AD Sign-in logs by Python and save them to the storage.

I couldn't find documents for authentication, could anyone give me some advice?


Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,396 questions
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 21,546 Reputation points Microsoft Employee

    Hi @RK , from my understanding, you want to authenticate and retrieve AD sign in logs? The best way to do this is by using the Graph API. The article linked details how you can authenticate with the Graph using python. This document shows how you can retrieve the sign in logs. Please let me know if you have any questions!

    If this answer helped you please mark it as "Verified" so other users may reference it.

    Thank you,

    0 comments No comments