Automate AD User Report Azure

berketjune2012 371 Reputation points
2023-08-30T20:12:10.5033333+00:00

Hello

I am looking for a way to automate downloading all users from Azure AD into an excel file and send an email with the report to recipients

Any suggestions?

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,278 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,646 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 26,486 Reputation points Microsoft Employee
    2023-08-31T18:21:15.5+00:00

    Hi @berketjune2012 ,to automate downloading all users from Azure AD into an Excel file and send an email with the report to recipients, you can follow these steps:

    1. Download users from Azure AD: You can download a list of users in Azure AD as a CSV file by navigating to Azure Active Directory > Users, and then selecting "Download users".
    2. Convert CSV to Excel: After downloading the CSV file, you can convert it to an Excel file using a script or a tool like Microsoft Excel.
    3. Send an email with the report: You can use Azure Logic Apps to create an automated task that sends periodic email reports with the Excel file attached. To set up the Logic App, follow these steps:

    a. Go to Backup Center > Backup Reports and click on the Email Report tab.

    b. Create a task by specifying the task details, data to export, and email options.

    c. Perform a one-time authorization for the Azure Monitor Logs and Office 365 connectors used by the Logic App.

    Please note that you might need to customize the Logic App to attach the Excel file instead of the default CSV file. Additionally, you may need to adjust the email frequency and recipient email IDs as per your requirements.
    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James


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.