How to get Azure AD Sign-in logs by Python

RK 1 Reputation point
2022-02-11T14:34:09.57+00:00

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?

Thanks,

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2022-02-16T23:52:42.363+00:00

    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,
    James

    0 comments No comments

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.