Created
May 24, 2020 11:17
-
-
Save krnese/e00bc368c4d7cc75cab093880b278410 to your computer and use it in GitHub Desktop.
Enable diagnostics of AAD to Log Analytics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/tenantDeploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"logAnalyticsResourceId": { | |
"type": "string", | |
"metadata": { | |
"description": "Provide the resourceId to your Log Analytics workspace that will receive the AAD auding/sign-in logs." | |
} | |
} | |
}, | |
"resources": [ | |
{ | |
"type": "microsoft.aadiam/diagnosticSettings", | |
"apiVersion": "2017-04-01", | |
"name": "setByARM", | |
"properties": { | |
"workspaceId": "[parameters('logAnalyticsResourceId')]", | |
"logAnalyticsDestinationType": null, | |
"logs": [ | |
{ | |
"category": "AuditLogs", | |
"enabled": true, | |
"retentionPolicy": { | |
"days": 0, | |
"enabled": false | |
} | |
}, | |
{ | |
"category": "SignInLogs", | |
"enabled": true, | |
"retentionPolicy": { | |
"days": 0, | |
"enabled": false | |
} | |
} | |
], | |
"metrics": [] | |
} | |
} | |
], | |
"outputs": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to be able to turn on all of the other categories for Diagnostic Logging (more than signin/audit logs)
You can hit the below repository json file
https://raw.githubusercontent.com/debaxtermsft/debaxtermsft/main/diaglogs2.json