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:24:19.4466667+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#enable-data-collection

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

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

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

Challenge faced

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 or what to do to solve this or any leads would 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
0 comments No comments
{count} votes

Accepted answer
  1. Manas Mohanty 465 Reputation points Microsoft Vendor
    2025-02-13T16:15:38.7433333+00:00

    Hi Arjun Sivasree

    Below error suggests that we need to add "Defender for IOT " or "Azure Security for IoT" as Log Analytics Contributor from the concerned log analytics IAM.

    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..

    Please make sure you have followed the steps on access controls and other required steps as mentioned in this document.

    Thank you.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.