Is there any Microsoft Graph API endpoint to get a user’s last known or current location?

Aniket Pachumbre 0 Reputation points
2025-10-30T04:21:58.15+00:00

I’m working with Microsoft Graph API and need to check if there’s any way to retrieve a user’s current or last known physical location (for example, GPS or network-based location).

I’ve looked through the Microsoft Graph documentation, but I only see properties such as officeLocation, city, or country on the /users endpoint — which are static profile fields, not live location data.

So my question is:

❓ Is there any Microsoft Graph API endpoint (in v1.0 or beta) that can return a user’s real-time or last known physical location?

If not, can Microsoft Graph access this information through any related API (like Intune or Teams), or is it intentionally restricted for privacy reasons?

I’d just like to confirm whether Microsoft Graph provides any direct or indirect way — now or in the future — to obtain a user’s real-world location.

Microsoft Teams | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Teddie-D 7,090 Reputation points Microsoft External Staff Moderator
    2025-10-30T05:11:41.5566667+00:00

    Hi @Aniket Pachumbre

    Thank you for posting your question in the Microsoft Q&A forum. 

    Microsoft Graph does not offer any endpoint in v1.0 or beta that provides GPS or network-based location data for users. This restriction is intentional to protect user privacy and prevent exposure of real-world location information through Graph APIs.

    If the device is enrolled in Microsoft Intune, location data can be accessed using Intune device management APIs. You can trigger a location request using the following endpoint: 

    POST /deviceManagement/managedDevices/{managedDeviceId}/locateDevice
    

    The response includes the deviceGeoLocation resource, which provides latitude, longitude, timestamp, accuracy, and speed. These APIs are intended for managed device scenarios such as locating a lost device or assisting with administrative troubleshooting. They require an active Intune license and the DeviceManagementManagedDevices.PrivilegedOperations.All permission. 
    References:  

    For Microsoft Teams apps, you can request the user's location using the getLocation() API from the Teams JavaScript SDK. This works across desktop, web, and mobile platforms, but only provides real-time location with explicit user consent. It does not support background or historical tracking and is not part of Microsoft Graph. This is a client-side capability intended for interactive use cases. 
    Reference: Add Location Capability with TeamsJS - Teams | Microsoft Learn

    At this time, there is no documentation indicating that support for accessing users' real-world location via Microsoft Graph is planned for the future. 

    I hope this information is helpful. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".    

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.