A cloud-native solution that protects workloads across hybrid and multi-cloud environments with threat detection and security recommendations
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.
- 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.
- 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
- 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.
- 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.
- 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.