All posts
WorkflowMarch 30, 20265 min read

How to extract an organization chart from Microsoft Teams

Teams shows you reporting lines but doesn't give you a clean export. Here's how to get the org structure out via Microsoft Graph, the People app, or as a fallback, from screenshots.

By Dawid Sibinski

Microsoft Teams shows organizational reporting lines in the profile cards and the Organization tab, but there's no "Export to Excel" button. The data lives in Azure Active Directory (now Entra ID), and getting it out cleanly means going there directly.

Microsoft Graph API: the canonical path

Reporting structure is just two fields on a user: manager (one person up) and directReports (people down). The Graph endpoints:

  • GET /users/{id}/manager — who this person reports to
  • GET /users/{id}/directReports — who reports to this person
  • GET /users — start from the top and walk down, or page through everyone

You'll need a registered app in Entra ID with User.Read.All permission, an admin consent, and a Graph SDK or plain HTTP client. The PowerShell route is faster for one-off pulls:

Connect-MgGraph -Scopes "User.Read.All" Get-MgUser -All -Property DisplayName, Mail, JobTitle, Department, Manager | Select-Object DisplayName, Mail, JobTitle, Department, @{N="Manager"; E={$_.Manager.AdditionalProperties.displayName}} | Export-Csv org.csv -NoTypeInformation

Entra ID admin center

If you have admin access and want a one-off CSV without writing code: Entra Admin Center → Users → Bulk operations → Download users. The CSV includes manager UPN, which lets you reconstruct the full tree in a spreadsheet.

When you don't have admin access

If you're a regular user trying to map a team's structure for your own reference, the Teams Organization tab and the Profile Card both show reporting lines but don't export. Practical options:

  • Take screenshots of the Organization tab as you click through people. Tedious but workable for a team of 20–50.
  • Run those screenshots through ExtractFox's image data extractor with a prompt like "extract name, title, and manager as a flat table." Useful when you need to onboard fast and don't have IT support.
  • Ask IT — they can pull the same Graph data in 60 seconds and save you a day.

Visualizing once you have the data

A flat manager column is enough to render an org chart. Visio, Lucidchart, and OrgPlus all import a CSV with employee/manager columns and produce a tree. Don't try to model it manually — the layout algorithm matters more than you think when you cross 100 people.

More on workflow

Stop reading, start extracting

Drop a PDF or image into ExtractFox and get structured data back in seconds.

Try a free extraction →