Back to Trending
RepositoryPowerShellCHSwitzerland
zh54321

zh54321/PoCEntraDeviceComplianceBypass

Simple pure PowerShell POC to bypass Entra / Intune Compliance Conditional Access Policy

171stars
17forks
0issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: entra

#1 Repository of the month

1
TINIX TRENDING·Topic: entraid

#1 Repository of the month

1
TINIX TRENDING·Topic: redteaming

#1 Repository of the month

POCEntraDeviceComplianceBypass

A Conditional Access Policy in Entra ID which only require a compliant device can be bypassed using Intune Portal client.

Note that any other Conditional Access Policies and conditions you’ve configured in your tenant will still apply!

Update February 2024: Microsoft changed the pre-consented scopes on the Azure AD Graph API (user_impersonation --> Service_PrincipalEndpoint.Read.All,User.Read). Therefore, it is not possible anymore to run tools like ROADrecon.

How To

Manual Approach using poc_entra_compliance_bypass.ps1

  1. Execute the script.

  2. Open the Browser Developer tools and authenticate normally.

  3. After clicking on "Continue" you should see an error message in the Browser console:

image

  1. Click on the URL in the Browser console (ms-appx-web://...) this will open the URL in a new tab. Copy the content of the code parameter into the script window. This will get you an access and refresh token (stored in $token):

image

The refresh token can, for example, be used to obtain an access token for Azure AD Graph.

Using Entra Token Aid

If you don’t want to hassle with copying things manually, you can simplify the process by using EntraTokenAid (https://github.com/zh54321/EntraTokenAid.git):

# Clone and import the tool
git clone https://github.com/zh54321/EntraTokenAid.git
cd EntraTokenAid
Import-mdoule EntraTokenAid.psm1

# Start the interactive authentication
$tokens = Invoke-Auth -ClientID '9ba1a5c7-f17a-4de9-a1f1-6178c8d51223' -RedirectUrl 'urn:ietf:wg:oauth:2.0:oob'
image

Credits

Similar Projects

Discover other similar projects and AI models.

RepositoryPowerShell
zh54321/EntraTokenAid

A pure PowerShell solution for Entra OAuth authentication, enabling easy retrieval of access and refresh tokens

156
Apr 9, 2026
RepositoryPython
byt3bl33d3r/CrackMapExec

A swiss army knife for pentesting networks

9.2k
Dec 6, 2023
RepositoryPython
jonaslejon/malicious-pdf

💀 Generate malicious PDF test files for testing phone-home callbacks, SSRF, XSS, NTLM credential theft, and data exfiltration in PDF viewers, converters, and web applications. Can be used with Burp Collaborator or Interactsh

4.6k
Nov 27, 2026
RepositoryPython
jonaslejon/ad-autopwn

AD AutoPwn v4.13.0 — automated AD attack chain, zero-auth to Domain Admin. Discover/Kerberoast/AS-REP/AD CS ESC1-16/Shadow Creds/RBCD+KCD/Ghost-SPN/TGS-rewrite/Dollar-Ticket/WPAD/WSUS/PXE/SCCM/BloodHound auto-action/Loot/DCSync/DPAPI + Synacktiv 2026 reflection (CVE-2025-58726/2026-24294/2026-26128). Authorized pentesting only.

221
Sep 25, 2026
RepositoryHTML
zh54321/GraphPreConsentExplorer

A comprehensive list of usable Entra ID first-party clients with pre-consented Microsoft Graph scopes, in a simple YAML-file explorable with a simple HTML GUI.

175
Nov 21, 2026
RepositoryTypeScript
KeygraphHQ/shannon

Shannon is an AI pentester for web applications and APIs. It analyzes your source code, identifies attack vectors, and executes real exploits to prove vulnerabilities before they reach production.

52.6k
Dec 2, 2026
RepositoryPython
sqlmapproject/sqlmap

Automatic SQL injection and database takeover tool

39.1k
Nov 30, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

488.2k
Dec 3, 2026
RepositoryJavaScript
affaan-m/ECC

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

315.7k
Dec 1, 2026