Defender for Storage: On-upload Malware Scanning Role Assignment — Clarification Needed

Tim McConnehey 0 Reputation points
2026-11-14T13:50:22.3766667+00:00

The Microsoft Learn overview for Defender for Storage malware scanning names both Storage Blob Data Owner and Defender for Storage Data Scanner for the scanner identity. For account-level on-upload scanning with Sensitive Data Discovery off and an Event Grid scan-results topic configured, which built-in role should Azure assign? Is there a supported way to require the narrower role without editing a provider-owned assignment? A reference explaining when each role is used would help.

Microsoft Security | Microsoft Defender | Microsoft Defender for Cloud
0 comments No comments

1 answer

Sort by: Most helpful
  1. Konstantinos Lianos 920 Reputation points Student Ambassador
    2026-11-15T18:45:22.9033333+00:00

    Hello @Tim McConnehey

    Thank you for raising this question. There is an inconsistency in the current Microsoft documentation regarding the role assigned to the managed identity used by Defender for Storage malware scanning.

    1. Storage Blob Data Owner

    The Microsoft Defender for Storage documentation states under "Resources deployed by malware scanning" that the StorageDataScanner managed identity receives the Storage Blob Data Owner role to access blob data for malware scanning and Sensitive Data Discovery.

    This role provides broad permissions over blob containers and their data.

    1. Defender for Storage Data Scanner

    However, the same documentation states under "Access and data privacy" that the StorageDataScanner identity receives the Defender for Storage Data Scanner role.

    This is a more restrictive built in role designed specifically for Defender for Storage. It includes permissions to read blobs, read and update blob index tags, and delete blobs.

    Its role definition ID is:

    1e7ca9b1-60d1-4db8-a914-f2ca1ff27c40

    1. Which role applies to your configuration?

    For account level on upload malware scanning with Sensitive Data Discovery disabled and an Event Grid scan results topic configured, the Defender for Storage Data Scanner role appears more closely aligned with the required scanning operations.

    However, Microsoft's published documentation does not explicitly confirm that disabling Sensitive Data Discovery causes Azure to select this narrower role.

    The Event Grid configuration controls scan result delivery and is not documented as determining the scanner's RBAC assignment.

    Therefore, we cannot conclusively state which role Azure should automatically assign for this specific configuration based on the available documentation.

    1. Can you enforce the narrower role?

    Currently, I could not find a documented, supported configuration option that forces Defender for Storage to use the narrower role instead of Storage Blob Data Owner.

    I would not recommend manually replacing or removing the role assignment created by the Defender for Storage service.

    These permissions are managed as part of the service deployment, and modifying them could interrupt scanning functionality or cause the service to restore its required permissions.

    1. Recommended next steps

    You can check the actual assignment by navigating to your Storage Account, Access Control (IAM), Role assignments, and locating the StorageDataScanner managed identity.

    If Storage Blob Data Owner is assigned, I recommend raising a Microsoft support request specifically asking whether Defender for Storage Data Scanner is supported for your configuration and whether a product managed mechanism exists to enforce that assignment.

    The documentation inconsistency should also be raised with the Defender for Storage product team for clarification.

    In summary, the narrower Defender for Storage Data Scanner role is documented for the scanner identity, but Microsoft has not clearly documented the conditions that determine which role is automatically assigned. Until this is clarified, I recommend retaining the service managed role assignment.

    I hope this helps! If my answer addresses your question, please consider marking it as "Accepted Answer" so other community members can benefit from it as well.

    Was this answer helpful?

    0 comments No comments

Your answer

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