B2C monitoring with Azure CLI

metalheart 336 Reputation points
2023-03-23T15:00:36.33+00:00

I'm looking to send diagnostic settings from a B2C tenant to a Log Analytics workspace with Azure CLI.

I was able to delegate access to the resource group under the AD tenant subscription to B2C with Azure Lighthouse described [here], set up the settings in Azure Portal and have verified the logs show up correctly.

Trying to access the diagnostic settings in Azure CLI like below however gives me an error "Code: ResourceTypeNotSupported. Message: The resource type 'microsoft.azureactivedirectory/b2cdirectories' does not support diagnostic settings."

az monitor diagnostic-settings show --name "Send B2C Logs" -g azure-b2c --resource-type "Microsoft.AzureActiveDirectory/b2cDirectories" --resource danielsb2c.onmicrosoft.com

I'm aware the Diagnostic Settings blade is not visible on the B2C Tenant but rather on the Active Directory page for this tenant but failed to determine the correct resource type and/or syntax for achieving this.

Any advice?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,598 questions
{count} vote