SOLVED

Set-AzDiagnosticSettings

New Contributor

I am facing the below issue while configuring the Log Analytics workspace to collect the logs in Azure Data Lake Store Diagnostics Settings.

WARNING: 1:08:03 PM - *** The namespace for all the model classes will change from Microsoft.Azure.Management.Monitor.Management.Model
s to Microsoft.Azure.Management.Monitor.Models in future releases.
WARNING: 1:08:03 PM - *** The namespace for output classes will be uniform for all classes in future releases to make it independent o
f modifications in the model classes.
Set-AzDiagnosticSetting : Exception type: ErrorResponseException, Message: Null/Empty, Code: Null, Status code:BadRequest, Reason
phrase: Bad Request
At line:1 char:1
+ Set-AzDiagnosticSetting -ResourceId $adls.Id -Name ADLS_Log_Analytics ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzDiagnosticSetting], PSInvalidOperationException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Insights.Diagnostics.SetAzureRmDiagnosticSettingCommand

1 Reply
best response confirmed by Vasil Michev (MVP)
Solution
My mistake! The issue is resolved after giving workspaceId as ResourceId of OMS workspace instead of Customer Id.