Fix Microsoft Graph 401 Unauthorized Error Setting Teams Presence Status
Question details
An administrator receives a 401 Unauthorized error when attempting to programmatically set the presence status of another Microsoft Teams user via Microsoft Graph.

- Product
- Microsoft Graph API
- Device & OS
- not provided
- Scenario
- Using Microsoft Graph API to update another user's Teams presence status after granting multiple permission scopes.
- Observed behavior
- The API call fails and returns a 401 Unauthorized error despite the administrator having configured several Graph permission scopes in the application.
Verify that you have administrative access to your Microsoft Entra ID (formerly Azure AD) portal to review application permissions and access tokens.
Consult Microsoft Graph Q&A for Tenant and API Limitations
Setting another user's presence status via Graph API has specific tenant configurations and permission restrictions that require official Microsoft support verification.
The ability to modify another user's presence status is highly restricted by Microsoft Graph. Even if you have granted scopes like Presence.ReadWrite.All, certain operations might not be supported under application-level permissions or may require specialized tenant settings.
Open your web browser and visit the official Microsoft Q&A website dedicated to Microsoft developer tools.
Select the 'Microsoft Graph' tag to ensure your query is routed to API specialists and Microsoft engineers.
Post your question including the specific API endpoint you are calling, the exact permission scopes granted in Entra ID, and the 401 Unauthorized error details.

Boost Your Team's Productivity with WPS Office
While troubleshooting complex Microsoft Graph and Teams API integrations, ensure your organization has the best tools for everyday document collaboration. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office, perfect for teams needing reliable word processing, spreadsheet, and presentation software without the heavy overhead.
- 1. Download the installer: Visit the official WPS Office website and download the free version for your operating system.
- 2. Install the suite: Run the setup file and follow the quick installation prompts to deploy WPS Office on your device.
- 3. Open existing Office files: Launch WPS Office and directly open your existing .docx, .xlsx, or .pptx files to continue working seamlessly.

Frequently Asked Questions
Why does Microsoft Graph return a 401 Unauthorized error?
A 401 error indicates that the access token provided in the API request is missing, expired, invalid, or lacks the necessary permission scopes required to access the requested endpoint.
Can I use application permissions to change Teams presence status?
Modifying user presence via Microsoft Graph often requires delegated permissions rather than application permissions, as it strictly ties to the authenticated user's context. Always consult the latest Microsoft Graph API documentation for supported permission types.
How do I check which permissions my Graph app has?
Log in to the Microsoft Entra admin center, navigate to 'App registrations', select your application, and click on 'API permissions' to review both configured and admin-consented scopes.




