Azure Penetration Testing: A Complete Guide to Scope, Rules and the Top Attack Paths

Almost every organisation now runs something important in Microsoft Azure, and most run their identity on Entra ID, the service formerly called Azure Active Directory. That makes Azure one of the most valuable targets an attacker can reach. It also makes it one of the most commonly misunderstood things to test. A traditional network penetration test will tell you very little about whether someone who steals one user's session could take over your subscriptions.
This guide explains how Azure penetration testing works in practice: what Microsoft allows, what you should scope, the attack paths testers find most often, how long a test takes and what it costs. It is written for IT and security leaders who need to commission a test, and for anyone who wants to understand why cloud testing is different. If you already know you need one, see our Azure penetration testing service.
Why Azure Needs a Different Kind of Test
In a traditional network, the perimeter is the firewall and the crown jewels sit on servers behind it. In Azure, the most important boundary is identity. Anyone with the right token can manage resources from anywhere in the world, through the portal, the command line or an API. A misconfigured role assignment can matter more than an unpatched server.
Microsoft's shared responsibility model makes the split clear. Microsoft secures the physical data centres, the hosts and the core platform. You are responsible for your identities, your access policies, your data and the way you configure the services you use. Almost every serious Azure compromise we see comes from the customer side of that line: excessive permissions, exposed secrets, weak Conditional Access or forgotten resources.
That is why a good Azure test spends as much time on the control plane, meaning Entra ID, role assignments and management APIs, as it does on the virtual machines and web applications you host. The NCSC's cloud security guidance makes a similar point: in the cloud, how you manage and configure services is a large part of your security.
What Microsoft Allows: The Rules of Engagement
A common question is whether you need Microsoft's permission. You do not. Microsoft's guidance confirms that since 15 June 2017 it has not required pre-approval or notification for penetration tests against your own Azure resources. You must still follow the Microsoft Cloud Unified Penetration Testing Rules of Engagement, and any third party tester needs your explicit written authorisation. Microsoft does not authorise testing on your behalf.
Allowed without asking Microsoft
- Testing endpoints on VMs, App Service, Functions and other resources you own or are authorised to test
- OWASP Top 10, API and web application testing, fuzzing within limits and port scanning your endpoints
- Test accounts and trial tenants for cross-tenant scenarios
- Testing your monitoring, detection and Conditional Access policies
Never allowed
- Denial of service testing of any kind, including simulations
- Accessing tenants, data or storage you do not own or have permission to test
- Using credentials or secrets that are not yours, including leaked ones
- Phishing Microsoft staff, or using Azure to phish anyone
- Post-exploitation against Microsoft's own services beyond a proof of concept
Two rules catch people out. First, denial of service testing is prohibited in all circumstances. If you need to test resilience to traffic floods, Microsoft directs you to its approved simulation partners. Second, if a tester finds a weakness in Microsoft's own services rather than your configuration, they must stop and report it through MSRC, Microsoft's vulnerability reporting service. Azure's automated abuse detection may also flag legitimate tests, so keep your authorisation letter to hand in case Microsoft asks.
The Five Attack Paths We Find Most Often
Individual findings matter, but the real risk in Azure usually comes from how they combine. A user with slightly too many rights, an app with a long lived secret and a subscription where everyone is Contributor can add up to full control of production. These are the paths testers find again and again. Choose one to see how it unfolds.
Choose a path to see how a small weakness becomes a big compromise
1. Identity takeover through phishing and weak Conditional Access
Most real Azure intrusions start with an account, not an exploit. Attackers steal sessions through phishing, adversary in the middle kits and device code phishing, a technique Microsoft has linked to state actors including Midnight Blizzard in its 2026 reporting. If Conditional Access does not require phishing-resistant MFA, compliant devices or trusted locations for sensitive roles, a stolen token can work from anywhere. Testers check whether policies have exclusions, legacy authentication gaps or break glass accounts that are used day to day.
2. App registrations and service principals with too much power
Applications need identities, and those identities often get more access than they need. A client secret committed to a code repository, stored in a pipeline variable or left in a configuration file can let an attacker sign in as the app. If that app holds Contributor or Owner on a subscription, or powerful Microsoft Graph permissions, the attacker inherits all of it. Testers look for secrets, certificate hygiene and permission sprawl across every app registration.
3. Contributor rights that become code execution
The Contributor role sounds harmless, but on virtual machines it allows features such as Run Command and extensions that execute scripts with the highest privileges on the server. From there, an attacker can request the VM's managed identity token and use whatever that identity can reach. Role assignments that were convenient during a project often outlive it.
4. Automation accounts, Logic Apps and stored secrets
Automation is where credentials like to hide. Runbooks, connections, deployment scripts and Logic Apps often hold passwords or keys that work elsewhere. Storage account keys and shared access signatures with long expiry dates are another common finding. Testers trace where secrets live, who can read them and what they unlock, including Key Vault access policies and network rules.
5. Hybrid identity as a bridge from on-premises
Many organisations sync identities from on-premises Active Directory. If cloud administrator accounts are synced from on-premises, or if sync and federation servers are not treated as tier zero assets, a compromise of the internal network can become a compromise of the cloud. Testers check that privileged cloud accounts are cloud only and that hybrid infrastructure is protected like a domain controller.
What to Include in Scope
An Azure test is only as good as its scope. The most common mistake is testing only what is visible from the internet. That tells you whether an outsider can get in, but not what happens once they do, which is where most of the damage occurs. Choose the test types that match the questions you need answered.
| Test type | What it answers | Typical effort |
|---|---|---|
| External attack surface | What can an outsider reach and exploit from the internet? | 2 to 4 days |
| Entra ID and tenant configuration review | Are identities, apps, roles and Conditional Access set up safely? | 3 to 5 days |
| Assumed breach | If one user or app is compromised, how far can an attacker get? | 5 to 10 days |
| Application and API testing | Are the apps you host on Azure secure against OWASP style attacks? | 3 to 10 days per application |
| Red team | Would your team detect and stop a realistic, goal driven attacker? | Several weeks |
For most organisations, the best value comes from combining an Entra ID and tenant configuration review with an assumed breach test that starts from a standard user account. Together they show how an attacker would move from a single compromised identity to the data and systems that matter. Applications hosted on Azure should be tested in their own right, especially if customers rely on them.
Before your Azure test starts
Tick what is already agreed for your Azure test. Nothing is stored.
How an Azure Test Runs
- Scoping and authorisation. Agree objectives, subscriptions, starting accounts and constraints, and sign written authorisation.
- Reconnaissance. Map tenants, domains, exposed services, app registrations and role assignments.
- Identity and configuration testing. Review Conditional Access, privileged roles, app permissions, guest access and hybrid identity.
- Exploitation and attack path testing. Safely prove which weaknesses can be chained, stopping at agreed boundaries.
- Reporting and debrief. Explain each finding, its business impact and how to fix it, with attack path diagrams.
- Retest. Verify that critical and high findings have been fixed.
A good tester will talk to you throughout. If they find something serious, such as exposed credentials with Owner rights, you should hear about it the same day rather than in the final report. Our article on cloud pen test reporting explains what a useful report looks like.
Tools Are Not a Substitute for Testing
Microsoft Defender for Cloud, Secure Score and cloud security posture management tools are valuable. They watch your configuration continuously and flag settings that break good practice. But they check rules, not attack paths. They will tell you a storage account allows public access. They will not tell you that a forgotten app secret, a Contributor role and a managed identity together give an attacker your customer database. Use cloud posture management for continuous hygiene and penetration testing to prove what is really exploitable.
Other Findings That Come Up Again and Again
Beyond the five big paths, a set of smaller weaknesses appears in most Azure tests. On their own they are rarely critical, but they make the big paths easier and they are usually quick to fix.
- Standing privilege. Global Administrator and Owner roles assigned permanently rather than through just in time activation with Privileged Identity Management.
- Guest accounts nobody reviews. External users from old projects who still have access to Teams, SharePoint or subscriptions.
- Legacy authentication. Older protocols that cannot do MFA, left enabled for one forgotten system.
- Open network rules. Network security groups that allow management ports from the internet, or storage and Key Vault firewalls left open to all networks.
- Missing logs. Diagnostic settings and sign-in logs not retained long enough to investigate an incident, or not sent anywhere anyone looks.
- Old resources. Test environments, snapshots and storage accounts left running long after the project ended, often with copies of real data.
- User consent to apps. Settings that let any user grant third party applications access to their mailbox or files, which attackers exploit through consent phishing.
Microsoft has also been rolling out mandatory MFA for Azure administration, which removes some of the easiest attacks on admin portals. It does not remove the need to check how your tokens, apps and roles are configured, which is where most of the findings above sit.
How to Prepare Your Team
A little preparation makes the test faster, cheaper and more useful. Agree a technical contact who can answer questions and grant access quickly. Create the test accounts the scope requires before day one, with the same permissions a real user in that role would have. Tell your security operations team, or your managed detection provider, whether you want them to know about the test. Testing without warning shows how well detection works, but make sure someone senior knows so a real alert is not ignored.
Finally, think about what you will do with the results. Book time for the people who own Entra ID and your subscriptions to fix findings, and agree a retest date before the test starts. A report that sits unread for six months has bought you very little.
How Long It Takes and What It Costs
Effort depends on scope, not on the size of your Azure bill. A focused configuration review or external test often takes three to five days. An assumed breach test across identity and several subscriptions usually takes five to ten. In the UK, thorough manual testing is commonly priced at around £1,000 to £1,500 per tester per day, so a focused Azure test might cost roughly £3,000 to £8,000 and a broader engagement £8,000 to £18,000. Our guide to penetration testing costs explains what pushes quotes up or down.
Most organisations test Azure at least annually and after significant changes, such as a new landing zone, a merger of tenants or a major application launch. Continuous posture monitoring in between keeps configuration drift under control.
How Cybergen Can Help
We test Azure the way attackers approach it, starting from identity and following the paths that lead to your data:
- Azure penetration testing of Entra ID, RBAC, Key Vault and your workloads, by CREST accredited testers
- Cloud security posture management to catch configuration drift between tests
- Identity security and privileged access management to fix the root causes testers find
- Red and purple teaming to check whether your team would detect a real cloud intrusion
To scope an Azure test, get a quote or talk to our team.
Microsoft updates its cloud testing rules and Azure features regularly. This guide reflects Microsoft's published rules of engagement as at 16 November 2026.
Frequently Asked Questions
Do I need to tell Microsoft before running an Azure penetration test?
No. Since 15 June 2017 Microsoft has not required pre-approval or notification for testing your own Azure resources. You must still follow the Microsoft Cloud Unified Penetration Testing Rules of Engagement, and a third party tester needs your written authorisation.
Can we test Microsoft 365 as part of an Azure test?
The no-notification rule applies to Azure. Microsoft 365 and other Microsoft online services are covered by the same unified rules of engagement, which limit what you can do to Microsoft's own services. In practice, testers focus on your configuration, such as Entra ID, Conditional Access, mailbox permissions and app consents, rather than attacking the platform itself.
How long does an Azure penetration test take?
A focused external or configuration review often takes three to five days. An assumed breach test across identity and subscriptions usually takes five to ten days. Large estates, multiple applications or red team exercises take longer. The scope, not the size of your bill from Microsoft, drives the effort.
How much does an Azure penetration test cost?
In the UK, thorough manual testing is commonly priced at around £1,000 to £1,500 per tester per day. A focused Azure test might therefore cost from roughly £3,000 to £8,000, and a broader assumed breach engagement £8,000 to £18,000. Our cost guide explains what drives the price up or down.
Is Microsoft Defender for Cloud enough instead of a pen test?
No. Defender for Cloud and similar tools are valuable for spotting misconfigurations continuously, but they check settings against rules. A penetration tester chains weaknesses together, tests what is actually exploitable and shows the business impact. The two work best together.
What should an Azure pen test report include?
An executive summary, the scope and dates, each finding with evidence, severity and clear remediation, and the attack paths showing how findings combine. It should also say what was tested and found secure, so you can show customers and auditors what the test covered.
Sources
- Microsoft Learn: Penetration testing (updated July 2026)
- Microsoft: Cloud Unified Penetration Testing Rules of Engagement
- Microsoft Learn: Shared responsibility in the cloud
- MSRC: Report a vulnerability
- Microsoft Threat Intelligence: CaptiveCrunch, Midnight Blizzard targets travellers (July 2026)
- NCSC: Penetration testing guidance
- NCSC: Cloud security guidance



