Failed dependency error while trying to link a log analytics workspace to defender for iot within iot hub.

Arjun Sivasree 45 Reputation points
2025-02-13T10:33:02.0766667+00:00

Hello everyone,

Context:

To understand how defender for iot for device builders work, I am linking log analytics workspace to the defender for IoT as per this document.

https://learn.microsoft.com/en-us/azure/defender-for-iot/device-builders/tutorial-configure-agent-based-solution

I followed the instructions to setup resource provider and access control for log analytics workspace.

resource provider: Microsoft.OperationsManagement

access control : Job function role, Log Analytics Contributor to azure security for iot

https://learn.microsoft.com/en-us/azure/defender-for-iot/device-builders/quickstart-onboard-iot-hub#allow-access-to-a-log-analytics-workspace

Then I went to enable Defender for iot --> settings --> data collection to link the log analytics workspace.

Challenge:

I am facing the following error.

FailedDependency

Unable to read Log Analytics workspace /subscriptions/.../providers/microsoft.operationalinsights/workspaces/law-defender-for-iot,

please make sure to grant the required permissions to access the Defender for IoT experience.

Would need the community's help to understand If I missed giving any access permissions for this attachment to succeed? Appreciate help.

Thanks.

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,241 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.