SOLVED

Set-AzDiagnosticSettings

%3CLINGO-SUB%20id%3D%22lingo-sub-321154%22%20slang%3D%22en-US%22%3ESet-AzDiagnosticSettings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-321154%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20facing%20the%20below%20issue%20while%20configuring%20the%20Log%20Analytics%20workspace%20to%20collect%20the%20logs%20in%20Azure%20Data%20Lake%20Store%20Diagnostics%20Settings.%3C%2FP%3E%3CP%3E%3CEM%3EWARNING%3A%201%3A08%3A03%20PM%20-%20***%20The%20namespace%20for%20all%20the%20model%20classes%20will%20change%20from%20Microsoft.Azure.Management.Monitor.Management.Model%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Es%20to%20Microsoft.Azure.Management.Monitor.Models%20in%20future%20releases.%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EWARNING%3A%201%3A08%3A03%20PM%20-%20***%20The%20namespace%20for%20output%20classes%20will%20be%20uniform%20for%20all%20classes%20in%20future%20releases%20to%20make%20it%20independent%20o%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3Ef%20modifications%20in%20the%20model%20classes.%3C%2FEM%3E%3CBR%20%2F%3E%3CSTRONG%3ESet-AzDiagnosticSetting%20%3A%20Exception%20type%3A%20ErrorResponseException%2C%20Message%3A%20Null%2FEmpty%2C%20Code%3A%20Null%2C%20Status%20code%3ABadRequest%2C%20Reason%20%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3Ephrase%3A%20Bad%20Request%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EAt%20line%3A1%20char%3A1%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%2B%20Set-AzDiagnosticSetting%20-ResourceId%20%24adls.Id%20-Name%20ADLS_Log_Analytics%20...%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%2B%20CategoryInfo%20%3A%20CloseError%3A%20(%3A)%20%5BSet-AzDiagnosticSetting%5D%2C%20PSInvalidOperationException%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.Azure.Commands.Insights.Diagnostics.SetAzureRmDiagnosticSettingCommand%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-321154%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Data%20Lake%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-321156%22%20slang%3D%22en-US%22%3ERE%3A%20Set-AzDiagnosticSettings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-321156%22%20slang%3D%22en-US%22%3EMy%20mistake!%20The%20issue%20is%20resolved%20after%20giving%20workspaceId%20as%20ResourceId%20of%20OMS%20workspace%20instead%20of%20Customer%20Id.%3C%2FLINGO-BODY%3E
Highlighted
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
Highlighted
Solution
My mistake! The issue is resolved after giving workspaceId as ResourceId of OMS workspace instead of Customer Id.