01 Run account list command (Windows/macOS/Linux) with custom output filters to list the IDs of the cloud subscriptions available in your Azure cloud account:
az account list
--query '[*].id'
02 The command output should return the requested subscription identifiers (IDs):
[
"abcdabcd-1234-abcd-1234-abcdabcdabcd",
"abcd1234-abcd-1234-abcd-abcd1234abcd"
]
03 Run account set command (Windows/macOS/Linux) with the ID of the Azure cloud subscription that you want to examine as the identifier parameter to set the selected subscription to be the current active subscription (the command does not produce an output):
az account set
--subscription abcdabcd-1234-abcd-1234-abcdabcdabcd
04 Run cognitiveservices account list command (Windows/macOS/Linux) with custom output filters to list the resource identifier (ID) of each Azure AI Services (AI Foundry) instance available within the current subscription:
az cognitiveservices account list
--query '[?(kind==`AIServices`)].id'
05 The command output should return the requested AI Foundry instance identifiers:
[
"/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.CognitiveServices/accounts/cc-project5-ai-service-instance",
"/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.CognitiveServices/accounts/cc-project5-ai-foundry-instance"
]
06 Run monitor diagnostic-settings list command (Windows/macOS/Linux) with the ID of the Azure AI Foundry instance that you want to examine as the identifier parameter and custom output filters to describe the name of each diagnostics setting configured for the selected instance:
az monitor diagnostic-settings list
--resource "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.CognitiveServices/accounts/cc-project5-ai-service-instance"
--query '[].name'
07 The command output should return the requested diagnostics setting identifiers (names). If the command output returns an empty array, i.e. [], there are no diagnostic settings configured for the selected Azure AI Foundry instance, therefore, the Audit process ends here:
[
"tm-ai-instance-diagnostic-logs",
"tm-ai-custom-diagnostic-logs"
]
08 Run monitor diagnostic-settings show command (Windows/macOS/Linux) with the name of the diagnostic setting that you want to examine as the identifier parameter, to describe the log categories supported by Azure AI Foundry, configured for the selected diagnostic setting:
az monitor diagnostic-settings show
--name "tm-ai-instance-diagnostic-logs"
--resource "/subscriptions/abcdabcd-1234-abcd-1234-abcdabcdabcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.CognitiveServices/accounts/cc-project5-ai-service-instance"
--query 'logs'
09 The command output should return the supported log categories and their status:
[
{
"category": "Audit",
"enabled": true,
"retentionPolicy": {
"days": 0,
"enabled": false
}
},
{
"category": "RequestResponse",
"enabled": false,
"retentionPolicy": {
"days": 0,
"enabled": false
}
},
{
"category": "AzureOpenAIRequestUsage",
"enabled": false,
"retentionPolicy": {
"days": 0,
"enabled": false
}
},
{
"category": "Trace",
"enabled": false,
"retentionPolicy": {
"days": 0,
"enabled": false
}
}
]
Check the
"enabled" attribute value for each log category supported by Azure AI Foundry to determine the logging configuration for the selected diagnostic setting. If one or more log categories are disabled (i.e.,
"enabled": false), the selected diagnostic setting is not properly configured to collect diagnostic logs.
10 Repeat steps no. 8 and 9 for each diagnostic setting created for the selected instance. If none of the diagnostic settings are properly configured, the Diagnostic Logs monitoring feature is not enabled for the selected Azure AI Foundry instance.