We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages an Azure Active Directory Diagnostic Setting for Azure Monitor.
!> Authentication The API for this resource does not support service principal authentication. This resource can only be used with Azure CLI authentication.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "west europe",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountKind = "StorageV2",
AccountReplicationType = "LRS",
});
var exampleAadDiagnosticSetting = new Azure.Monitoring.AadDiagnosticSetting("exampleAadDiagnosticSetting", new Azure.Monitoring.AadDiagnosticSettingArgs
{
StorageAccountId = exampleAccount.Id,
Logs =
{
new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
{
Category = "SignInLogs",
Enabled = true,
RetentionPolicy = new Azure.Monitoring.Inputs.AadDiagnosticSettingLogRetentionPolicyArgs
{
Enabled = true,
Days = 1,
},
},
new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
{
Category = "AuditLogs",
Enabled = true,
RetentionPolicy = new Azure.Monitoring.Inputs.AadDiagnosticSettingLogRetentionPolicyArgs
{
Enabled = true,
Days = 1,
},
},
new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
{
Category = "NonInteractiveUserSignInLogs",
Enabled = true,
RetentionPolicy = new Azure.Monitoring.Inputs.AadDiagnosticSettingLogRetentionPolicyArgs
{
Enabled = true,
Days = 1,
},
},
new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
{
Category = "ServicePrincipalSignInLogs",
Enabled = true,
RetentionPolicy = new Azure.Monitoring.Inputs.AadDiagnosticSettingLogRetentionPolicyArgs
{
Enabled = true,
Days = 1,
},
},
new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
{
Category = "ManagedIdentitySignInLogs",
Enabled = false,
RetentionPolicy = ,
},
new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
{
Category = "ProvisioningLogs",
Enabled = false,
RetentionPolicy = ,
},
new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
{
Category = "ADFSSignInLogs",
Enabled = false,
RetentionPolicy = ,
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/monitoring"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("west europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountKind: pulumi.String("StorageV2"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
_, err = monitoring.NewAadDiagnosticSetting(ctx, "exampleAadDiagnosticSetting", &monitoring.AadDiagnosticSettingArgs{
StorageAccountId: exampleAccount.ID(),
Logs: monitoring.AadDiagnosticSettingLogArray{
&monitoring.AadDiagnosticSettingLogArgs{
Category: pulumi.String("SignInLogs"),
Enabled: pulumi.Bool(true),
RetentionPolicy: &monitoring.AadDiagnosticSettingLogRetentionPolicyArgs{
Enabled: pulumi.Bool(true),
Days: pulumi.Int(1),
},
},
&monitoring.AadDiagnosticSettingLogArgs{
Category: pulumi.String("AuditLogs"),
Enabled: pulumi.Bool(true),
RetentionPolicy: &monitoring.AadDiagnosticSettingLogRetentionPolicyArgs{
Enabled: pulumi.Bool(true),
Days: pulumi.Int(1),
},
},
&monitoring.AadDiagnosticSettingLogArgs{
Category: pulumi.String("NonInteractiveUserSignInLogs"),
Enabled: pulumi.Bool(true),
RetentionPolicy: &monitoring.AadDiagnosticSettingLogRetentionPolicyArgs{
Enabled: pulumi.Bool(true),
Days: pulumi.Int(1),
},
},
&monitoring.AadDiagnosticSettingLogArgs{
Category: pulumi.String("ServicePrincipalSignInLogs"),
Enabled: pulumi.Bool(true),
RetentionPolicy: &monitoring.AadDiagnosticSettingLogRetentionPolicyArgs{
Enabled: pulumi.Bool(true),
Days: pulumi.Int(1),
},
},
&monitoring.AadDiagnosticSettingLogArgs{
Category: pulumi.String("ManagedIdentitySignInLogs"),
Enabled: pulumi.Bool(false),
RetentionPolicy: nil,
},
&monitoring.AadDiagnosticSettingLogArgs{
Category: pulumi.String("ProvisioningLogs"),
Enabled: pulumi.Bool(false),
RetentionPolicy: nil,
},
&monitoring.AadDiagnosticSettingLogArgs{
Category: pulumi.String("ADFSSignInLogs"),
Enabled: pulumi.Bool(false),
RetentionPolicy: nil,
},
},
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "west europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountKind: "StorageV2",
accountReplicationType: "LRS",
});
const exampleAadDiagnosticSetting = new azure.monitoring.AadDiagnosticSetting("exampleAadDiagnosticSetting", {
storageAccountId: exampleAccount.id,
logs: [
{
category: "SignInLogs",
enabled: true,
retentionPolicy: {
enabled: true,
days: 1,
},
},
{
category: "AuditLogs",
enabled: true,
retentionPolicy: {
enabled: true,
days: 1,
},
},
{
category: "NonInteractiveUserSignInLogs",
enabled: true,
retentionPolicy: {
enabled: true,
days: 1,
},
},
{
category: "ServicePrincipalSignInLogs",
enabled: true,
retentionPolicy: {
enabled: true,
days: 1,
},
},
{
category: "ManagedIdentitySignInLogs",
enabled: false,
retentionPolicy: {},
},
{
category: "ProvisioningLogs",
enabled: false,
retentionPolicy: {},
},
{
category: "ADFSSignInLogs",
enabled: false,
retentionPolicy: {},
},
],
});
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="west europe")
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_kind="StorageV2",
account_replication_type="LRS")
example_aad_diagnostic_setting = azure.monitoring.AadDiagnosticSetting("exampleAadDiagnosticSetting",
storage_account_id=example_account.id,
logs=[
azure.monitoring.AadDiagnosticSettingLogArgs(
category="SignInLogs",
enabled=True,
retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(
enabled=True,
days=1,
),
),
azure.monitoring.AadDiagnosticSettingLogArgs(
category="AuditLogs",
enabled=True,
retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(
enabled=True,
days=1,
),
),
azure.monitoring.AadDiagnosticSettingLogArgs(
category="NonInteractiveUserSignInLogs",
enabled=True,
retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(
enabled=True,
days=1,
),
),
azure.monitoring.AadDiagnosticSettingLogArgs(
category="ServicePrincipalSignInLogs",
enabled=True,
retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(
enabled=True,
days=1,
),
),
azure.monitoring.AadDiagnosticSettingLogArgs(
category="ManagedIdentitySignInLogs",
enabled=False,
retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(),
),
azure.monitoring.AadDiagnosticSettingLogArgs(
category="ProvisioningLogs",
enabled=False,
retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(),
),
azure.monitoring.AadDiagnosticSettingLogArgs(
category="ADFSSignInLogs",
enabled=False,
retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(),
),
])
Example coming soon!
Create AadDiagnosticSetting Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AadDiagnosticSetting(name: string, args: AadDiagnosticSettingArgs, opts?: CustomResourceOptions);@overload
def AadDiagnosticSetting(resource_name: str,
args: AadDiagnosticSettingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AadDiagnosticSetting(resource_name: str,
opts: Optional[ResourceOptions] = None,
logs: Optional[Sequence[AadDiagnosticSettingLogArgs]] = None,
eventhub_authorization_rule_id: Optional[str] = None,
eventhub_name: Optional[str] = None,
log_analytics_workspace_id: Optional[str] = None,
name: Optional[str] = None,
storage_account_id: Optional[str] = None)func NewAadDiagnosticSetting(ctx *Context, name string, args AadDiagnosticSettingArgs, opts ...ResourceOption) (*AadDiagnosticSetting, error)public AadDiagnosticSetting(string name, AadDiagnosticSettingArgs args, CustomResourceOptions? opts = null)
public AadDiagnosticSetting(String name, AadDiagnosticSettingArgs args)
public AadDiagnosticSetting(String name, AadDiagnosticSettingArgs args, CustomResourceOptions options)
type: azure:monitoring:AadDiagnosticSetting
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AadDiagnosticSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AadDiagnosticSettingArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AadDiagnosticSettingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AadDiagnosticSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AadDiagnosticSettingArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var aadDiagnosticSettingResource = new Azure.Monitoring.AadDiagnosticSetting("aadDiagnosticSettingResource", new()
{
Logs = new[]
{
new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
{
Category = "string",
RetentionPolicy = new Azure.Monitoring.Inputs.AadDiagnosticSettingLogRetentionPolicyArgs
{
Days = 0,
Enabled = false,
},
Enabled = false,
},
},
EventhubAuthorizationRuleId = "string",
EventhubName = "string",
LogAnalyticsWorkspaceId = "string",
Name = "string",
StorageAccountId = "string",
});
example, err := monitoring.NewAadDiagnosticSetting(ctx, "aadDiagnosticSettingResource", &monitoring.AadDiagnosticSettingArgs{
Logs: monitoring.AadDiagnosticSettingLogArray{
&monitoring.AadDiagnosticSettingLogArgs{
Category: pulumi.String("string"),
RetentionPolicy: &monitoring.AadDiagnosticSettingLogRetentionPolicyArgs{
Days: pulumi.Int(0),
Enabled: pulumi.Bool(false),
},
Enabled: pulumi.Bool(false),
},
},
EventhubAuthorizationRuleId: pulumi.String("string"),
EventhubName: pulumi.String("string"),
LogAnalyticsWorkspaceId: pulumi.String("string"),
Name: pulumi.String("string"),
StorageAccountId: pulumi.String("string"),
})
var aadDiagnosticSettingResource = new AadDiagnosticSetting("aadDiagnosticSettingResource", AadDiagnosticSettingArgs.builder()
.logs(AadDiagnosticSettingLogArgs.builder()
.category("string")
.retentionPolicy(AadDiagnosticSettingLogRetentionPolicyArgs.builder()
.days(0)
.enabled(false)
.build())
.enabled(false)
.build())
.eventhubAuthorizationRuleId("string")
.eventhubName("string")
.logAnalyticsWorkspaceId("string")
.name("string")
.storageAccountId("string")
.build());
aad_diagnostic_setting_resource = azure.monitoring.AadDiagnosticSetting("aadDiagnosticSettingResource",
logs=[{
"category": "string",
"retention_policy": {
"days": 0,
"enabled": False,
},
"enabled": False,
}],
eventhub_authorization_rule_id="string",
eventhub_name="string",
log_analytics_workspace_id="string",
name="string",
storage_account_id="string")
const aadDiagnosticSettingResource = new azure.monitoring.AadDiagnosticSetting("aadDiagnosticSettingResource", {
logs: [{
category: "string",
retentionPolicy: {
days: 0,
enabled: false,
},
enabled: false,
}],
eventhubAuthorizationRuleId: "string",
eventhubName: "string",
logAnalyticsWorkspaceId: "string",
name: "string",
storageAccountId: "string",
});
type: azure:monitoring:AadDiagnosticSetting
properties:
eventhubAuthorizationRuleId: string
eventhubName: string
logAnalyticsWorkspaceId: string
logs:
- category: string
enabled: false
retentionPolicy:
days: 0
enabled: false
name: string
storageAccountId: string
AadDiagnosticSetting Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AadDiagnosticSetting resource accepts the following input properties:
- Logs
List<Aad
Diagnostic Setting Log> - One or more
logblocks as defined below. - string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- Eventhub
Name string - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- Log
Analytics stringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- Name string
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- Storage
Account stringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- Logs
[]Aad
Diagnostic Setting Log Args - One or more
logblocks as defined below. - string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- Eventhub
Name string - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- Log
Analytics stringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- Name string
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- Storage
Account stringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- logs
List<Aad
Diagnostic Setting Log> - One or more
logblocks as defined below. - String
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub
Name String - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- log
Analytics StringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- name String
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- storage
Account StringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- logs
Aad
Diagnostic Setting Log[] - One or more
logblocks as defined below. - string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub
Name string - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- log
Analytics stringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- name string
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- storage
Account stringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- logs
Sequence[Aad
Diagnostic Setting Log Args] - One or more
logblocks as defined below. - str
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub_
name str - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- log_
analytics_ strworkspace_ id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- name str
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- storage_
account_ strid - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- logs List<Property Map>
- One or more
logblocks as defined below. - String
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub
Name String - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- log
Analytics StringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- name String
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- storage
Account StringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the AadDiagnosticSetting resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AadDiagnosticSetting Resource
Get an existing AadDiagnosticSetting resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AadDiagnosticSettingState, opts?: CustomResourceOptions): AadDiagnosticSetting@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
eventhub_authorization_rule_id: Optional[str] = None,
eventhub_name: Optional[str] = None,
log_analytics_workspace_id: Optional[str] = None,
logs: Optional[Sequence[AadDiagnosticSettingLogArgs]] = None,
name: Optional[str] = None,
storage_account_id: Optional[str] = None) -> AadDiagnosticSettingfunc GetAadDiagnosticSetting(ctx *Context, name string, id IDInput, state *AadDiagnosticSettingState, opts ...ResourceOption) (*AadDiagnosticSetting, error)public static AadDiagnosticSetting Get(string name, Input<string> id, AadDiagnosticSettingState? state, CustomResourceOptions? opts = null)public static AadDiagnosticSetting get(String name, Output<String> id, AadDiagnosticSettingState state, CustomResourceOptions options)resources: _: type: azure:monitoring:AadDiagnosticSetting get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- Eventhub
Name string - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- Log
Analytics stringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- Logs
List<Aad
Diagnostic Setting Log> - One or more
logblocks as defined below. - Name string
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- Storage
Account stringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- Eventhub
Name string - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- Log
Analytics stringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- Logs
[]Aad
Diagnostic Setting Log Args - One or more
logblocks as defined below. - Name string
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- Storage
Account stringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- String
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub
Name String - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- log
Analytics StringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- logs
List<Aad
Diagnostic Setting Log> - One or more
logblocks as defined below. - name String
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- storage
Account StringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub
Name string - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- log
Analytics stringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- logs
Aad
Diagnostic Setting Log[] - One or more
logblocks as defined below. - name string
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- storage
Account stringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- str
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub_
name str - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- log_
analytics_ strworkspace_ id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- logs
Sequence[Aad
Diagnostic Setting Log Args] - One or more
logblocks as defined below. - name str
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- storage_
account_ strid - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
- String
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.
- eventhub
Name String - Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
- log
Analytics StringWorkspace Id - Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
- logs List<Property Map>
- One or more
logblocks as defined below. - name String
- The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
- storage
Account StringId - The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.
Supporting Types
AadDiagnosticSettingLog, AadDiagnosticSettingLogArgs
- Category string
- The log category for the Azure Active Directory Diagnostic. Possible values are
AuditLogs,SignInLogs,ADFSSignInLogs,ManagedIdentitySignInLogs,NonInteractiveUserSignInLogs,ProvisioningLogs,RiskyUsers,ServicePrincipalSignInLogs,UserRiskEvents. - Retention
Policy AadDiagnostic Setting Log Retention Policy - A
retention_policyblock as defined below. - Enabled bool
- Is this Diagnostic Log enabled? Defaults to
true.
- Category string
- The log category for the Azure Active Directory Diagnostic. Possible values are
AuditLogs,SignInLogs,ADFSSignInLogs,ManagedIdentitySignInLogs,NonInteractiveUserSignInLogs,ProvisioningLogs,RiskyUsers,ServicePrincipalSignInLogs,UserRiskEvents. - Retention
Policy AadDiagnostic Setting Log Retention Policy - A
retention_policyblock as defined below. - Enabled bool
- Is this Diagnostic Log enabled? Defaults to
true.
- category String
- The log category for the Azure Active Directory Diagnostic. Possible values are
AuditLogs,SignInLogs,ADFSSignInLogs,ManagedIdentitySignInLogs,NonInteractiveUserSignInLogs,ProvisioningLogs,RiskyUsers,ServicePrincipalSignInLogs,UserRiskEvents. - retention
Policy AadDiagnostic Setting Log Retention Policy - A
retention_policyblock as defined below. - enabled Boolean
- Is this Diagnostic Log enabled? Defaults to
true.
- category string
- The log category for the Azure Active Directory Diagnostic. Possible values are
AuditLogs,SignInLogs,ADFSSignInLogs,ManagedIdentitySignInLogs,NonInteractiveUserSignInLogs,ProvisioningLogs,RiskyUsers,ServicePrincipalSignInLogs,UserRiskEvents. - retention
Policy AadDiagnostic Setting Log Retention Policy - A
retention_policyblock as defined below. - enabled boolean
- Is this Diagnostic Log enabled? Defaults to
true.
- category str
- The log category for the Azure Active Directory Diagnostic. Possible values are
AuditLogs,SignInLogs,ADFSSignInLogs,ManagedIdentitySignInLogs,NonInteractiveUserSignInLogs,ProvisioningLogs,RiskyUsers,ServicePrincipalSignInLogs,UserRiskEvents. - retention_
policy AadDiagnostic Setting Log Retention Policy - A
retention_policyblock as defined below. - enabled bool
- Is this Diagnostic Log enabled? Defaults to
true.
- category String
- The log category for the Azure Active Directory Diagnostic. Possible values are
AuditLogs,SignInLogs,ADFSSignInLogs,ManagedIdentitySignInLogs,NonInteractiveUserSignInLogs,ProvisioningLogs,RiskyUsers,ServicePrincipalSignInLogs,UserRiskEvents. - retention
Policy Property Map - A
retention_policyblock as defined below. - enabled Boolean
- Is this Diagnostic Log enabled? Defaults to
true.
AadDiagnosticSettingLogRetentionPolicy, AadDiagnosticSettingLogRetentionPolicyArgs
Import
Monitor Azure Active Directory Diagnostic Settings can be imported using the resource id, e.g.
$ pulumi import azure:monitoring/aadDiagnosticSetting:AadDiagnosticSetting example /providers/Microsoft.AADIAM/diagnosticSettings/setting1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
