logo
search
Others

How to Import Microsoft Teams Presence into Excel using Graph API

Natalie TaylorNatalie Taylor Oct 23, 2026 870 views

Question details

The user wants to fetch live employee availability data from Microsoft Teams and display it within an Excel spreadsheet using an automation tool like VBA.

How to Import Microsoft Teams Presence into Excel using Graph API
Product
Microsoft Excel, Microsoft Teams, Microsoft Graph API
Device & OS
not provided
Scenario
Tracking employee availability or live presence programmatically directly within an Excel spreadsheet.
Observed behavior
Needs a custom programmatic solution to connect Excel with Teams presence data since native Exchange data only provides basic mailbox information.
Before you start

Ensure you have an active Microsoft Azure active directory account and the necessary administrative rights to grant Graph API permissions for your organization.

Solution 1Recommended

Use Microsoft Graph API with Excel VBA

Connect Excel to Microsoft Teams using the Graph Presence API and VBA scripts to fetch and display live employee availability.

Microsoft Exchange data generally provides mailbox information rather than live Teams presence. To get real-time availability, you must use the Microsoft Graph Presence API authenticated via Azure Active Directory.

1
Register an application in Azure

Log into the Azure portal, register a new application, and grant it the required Microsoft Graph permissions, such as Presence.Read or Presence.Read.All.

2
Generate an authentication token

Implement OAuth 2.0 authentication in your workflow to securely generate an access token that allows your script to connect to the Graph API.

3
Write the VBA request in Excel

Open your Excel workbook, press ALT + F11 to access the VBA Editor, and create a macro utilizing MSXML2.XMLHTTP to send a GET request to the Graph Presence API endpoint.

4
Parse and output the data

Use a JSON parser in VBA to extract the availability statuses from the API response and map the data directly into your designated Excel cells.

Use Microsoft Graph API with Excel VBA
Developer Resources: Writing VBA for REST API calls requires some programming knowledge. You can find sample authentication scripts and JSON parsers on developer communities like Stack Overflow.
Free Microsoft Office alternative

Looking for a Lightweight, VBA-Compatible Alternative to Excel?

While connecting Microsoft Teams presence heavily relies on the Microsoft 365 ecosystem, if you are looking for a robust, everyday spreadsheet tool that fully supports VBA and macros, try WPS Office. It is highly compatible with Microsoft Excel formats and offers a familiar interface without the heavy subscription costs.

Highly compatible with Microsoft Excel formats (.xlsx, .xls, .csv).Supports advanced VBA and Macro scripting for custom API automation.Free, lightweight, and fast to install on Windows, Mac, and Linux.Includes Writer, Presentation, and PDF tools in one single application.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use Microsoft Exchange data to get Teams presence in Excel?

No. Exchange data generally provides mailbox information (like out-of-office status) rather than live Teams presence. You must use the Microsoft Graph Presence API for real-time availability.

What API permissions are required to read Teams presence?

To read presence information for users in your organization, your application requires the 'Presence.Read.All' permission granted by an administrator in Microsoft Graph.

Can I use Python or Power Automate instead of VBA?

Yes. Microsoft Graph API can be accessed via any programming language or automation tool that supports HTTP requests, including Python, Power Automate, and Office Scripts.