0
0
Azurecloud~5 mins

Compliance standards (SOC, ISO, GDPR) in Azure - Commands & Configuration

Choose your learning style9 modes available
Introduction
Compliance standards help companies follow rules to keep data safe and private. SOC, ISO, and GDPR are examples that guide how to protect information and show trustworthiness.
When you store customer data and need to prove it is protected properly.
When your company wants to meet international security rules to work with global partners.
When you handle personal data of people in Europe and must follow privacy laws.
When you want to show your cloud setup meets recognized safety standards.
When auditors ask for evidence of your security controls and policies.
Commands
This command lists the compliance standards assessments available in your Azure subscription and shows their current status.
Terminal
az security regulatory-compliance-assessment list --query "[].{Name:name, Status:status.code}"
Expected OutputExpected
[{"Name":"SOC TSP","Status":"Healthy"},{"Name":"ISO 27001","Status":"Healthy"},{"Name":"GDPR","Status":"Unhealthy"}]
--query - Filters and formats the output to show only the name and status of each compliance assessment.
This command shows detailed information about the GDPR compliance assessment, including which controls are met or need attention.
Terminal
az security regulatory-compliance-assessment show --name GDPR
Expected OutputExpected
{ "name": "GDPR", "status": { "code": "Unhealthy", "description": "Some controls are not met" }, "controls": [ {"name": "Data Protection", "status": "Healthy"}, {"name": "Consent Management", "status": "Unhealthy"} ] }
This command shows details about the specific control 'Consent Management' under GDPR to understand what needs fixing.
Terminal
az security regulatory-compliance-assessment control show --name GDPR --control-name "Consent Management"
Expected OutputExpected
{ "name": "Consent Management", "status": "Unhealthy", "description": "Ensure user consent is properly recorded and managed.", "recommendations": [ "Implement consent logging", "Review consent policies" ] }
Key Concept

If you remember nothing else from this pattern, remember: compliance standards are checklists that help you prove your cloud setup protects data correctly.

Common Mistakes
Running compliance commands without proper Azure Security Center permissions
The commands will fail or show incomplete data because the user lacks access rights.
Ensure your Azure account has Security Reader or higher role assigned before running compliance commands.
Ignoring unhealthy status in compliance assessments
Unhealthy means some controls are not met, which can lead to security risks or audit failures.
Review the detailed control reports and fix issues to improve compliance status.
Summary
Use Azure CLI commands to list and check compliance standards like SOC, ISO, and GDPR.
Review detailed control reports to understand which parts of compliance need improvement.
Fix issues found in controls to maintain a healthy compliance status and protect data.