is there a way to create Diagnostic Settings for Entra ID, which collects all the logs except for signinlogs and sends them to log analytics workspace and to storage account using Powershell?
Just to be clear, I am not speaking about resource-specific Diagnostic Settings, those can be retrieved/deleted using Get/Remove-AzDiagnosticSetting -ResourceId cmdlet.
I am asking this question because I like to automate it
To create Diagnostic Settings for Entra ID which collects all the logs except for
SignInLogs, make use of below PowerShell script:The Microsoft Entra ID Diagnostic Settings created successfully:
Except the
SignInLogs, all other logs are selected:Based on your requirement you can modify the script to configure the logs and collect the logs.
To fetch and delete the Microsoft Entra ID Diagnostic Settings, refer this SO Thread by me.