All posts
Workflow8 min read

How to extract an organization chart from Microsoft Teams

Export a Microsoft Teams organization chart to Excel or CSV with Microsoft Graph, Entra PowerShell, or screenshots when you do not have admin access.

By · Updated

Microsoft Teams shows reporting lines in profile cards and the Organization tab, but it does not provide a direct Excel or CSV export. The hierarchy comes from manager relationships in Microsoft Entra ID. Export those relationships with Microsoft Graph or Entra PowerShell; if you do not have directory access, extract the visible names and reporting lines from overlapping Teams screenshots.

MethodBest forAccess neededOutput
Microsoft GraphRepeatable company-wide exportApp registration and directory permissionJSON or CSV
Entra PowerShellOne-off admin exportEntra admin consentCSV
Teams screenshotsSmall team, no admin accessNormal Teams accessExcel, CSV, or JSON

Option 1: export reporting lines with Microsoft Graph

Microsoft Graph exposes the hierarchy as relationships. GET /users/{id}/manager returns the person one level above a user, while GET /users/{id}/directReports returns the people immediately below them. The directReports endpoint does not return the entire tree recursively, so a full export must page through users and resolve a manager for each one.

  • 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

For an organization-wide export, register an app in Entra ID, request the least directory permission that covers your tenant, and obtain administrator consent. Store both a stable identifier and a readable value for the manager. Names are not unique; manager_id or manager_email is a safer key than manager_name.

Option 2: export with Entra PowerShell

For a one-off administrator export, Entra PowerShell is easier to audit than a recursive script. Connect with User.Read.All, list active member users, resolve each manager with Get-EntraUserManager, and write a flat employee-manager row. Microsoft's current Entra PowerShell documentation also provides Get-EntraUserDirectReport for walking downward from a known leader.

$users = Get-EntraUser -All -Property Id,DisplayName,UserPrincipalName,JobTitle,Department,AccountEnabled $rows = foreach ($user in $users | Where-Object AccountEnabled) { $manager = Get-EntraUserManager -UserId $user.Id -ErrorAction SilentlyContinue [PSCustomObject]@{ employee_id = $user.Id employee = $user.DisplayName email = $user.UserPrincipalName title = $user.JobTitle department = $user.Department manager_id = $manager.Id manager = $manager.DisplayName } } $rows | Export-Csv org-chart.csv -NoTypeInformation -Encoding UTF8

Test the command on a small group before running it tenant-wide. Directory permissions can expose personal and organizational data, so keep the export in an approved location and remove columns you do not need. For a visualization, the essential columns are employee_id, employee, manager_id, and manager.

Option 3: extract the chart from Teams screenshots

Microsoft Support confirms that the Teams Organization tab shows who a person reports to and who reports to them. It is not available in every tenant because an administrator must enable it. When the tab is available but you cannot query Entra ID, screenshots are the practical fallback for a small team.

  1. Start with the most senior person visible in your part of the organization and open their Organization tab.
  2. Capture the manager, selected employee, and every visible direct report in the same screenshot.
  3. Open each direct report and take the next screenshot with one or two people overlapping the previous image. The overlap is how you verify the branch connection.
  4. Extract each image into the same columns: employee, title, department, manager, and source_screenshot.
  5. Append the rows, normalize names, and deduplicate on employee plus manager. Review people who appear with two different managers before importing the result.
Tool
Turn Teams org-chart screenshots into a table
Upload a screenshot and ask for employee, title, department, and manager. Export the result as Excel, CSV, or JSON without manually retyping every profile card.
Try it free
Drop your image — see a live preview

No signup required. You'll see a sample of extracted fields; unlock the full export on the tool page or with a plan.

Drop a PDF or image

Use a stable table shape

Keep the export flat even if the final result is a tree. One employee per row makes missing managers, loops, duplicates, and disconnected branches easy to find. It also imports cleanly into Power BI, Visio, Lucidchart, OrgPlus, and most HR systems.

employee_idemployeetitledepartmentmanager_idmanager
u-1042Alex MorganVP SalesSalesu-1001Jordan Lee
u-1128Sam RiveraSales ManagerSalesu-1042Alex Morgan
u-1194Taylor ChenAccount ExecutiveSalesu-1128Sam Rivera

Validate the hierarchy before visualizing

  • Every employee except the root should have exactly one manager.
  • No employee_id should also appear as its own manager_id.
  • Disabled accounts, contractors, shared mailboxes, and unfilled positions should be marked explicitly instead of silently dropped.
  • Duplicate display names should be resolved with email or Entra object ID.
  • A manager referenced by a row should either have their own row or be deliberately marked as outside the exported scope.

Once the checks pass, a flat employee-manager table is enough to render the org chart. Keep the CSV as the source of truth and regenerate the diagram when Entra relationships change instead of editing boxes manually.

Frequently asked questions

Can I export an organization chart directly from Microsoft Teams?+

Teams displays reporting lines in the Organization tab but does not provide a direct Excel or CSV export. Administrators can export the underlying manager relationships from Microsoft Entra ID or Microsoft Graph. Regular users can capture the visible chart as screenshots and convert those into a flat employee-manager table.

Which Microsoft Graph fields are needed for an org chart?+

Use each employee's id, displayName, userPrincipalName or mail, jobTitle, department, and manager relationship. A flat table with one row per employee and a manager_id or manager_email column is enough to rebuild the hierarchy in Excel, Power BI, Visio, or another org-chart tool.

Can I extract a Teams org chart without admin access?+

Yes, for a small team. Open the Organization tab for each branch, take overlapping screenshots, and extract name, title, department, and manager into one table. This is practical for tens of people; for hundreds, ask an Entra administrator for a directory export.

Why are some employees missing from the Teams organization chart?+

Teams reads the hierarchy from manager relationships in Microsoft Entra ID. A user can be missing or appear in the wrong branch when their manager field is empty or outdated, their account is disabled, or the Organization tab has not been enabled by the Teams administrator.

Related reading

Stop reading, start extracting

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

Try a free extraction →