Unable to Retrieve Anything But "PresenceUnknown" Status for Teams in External Integration

chikaraN_72 0 Reputation points
2024-03-01T09:16:14.0733333+00:00

I am currently developing an application that integrates with Outlook as an external collaborator. Specifically, I am implementing a feature that displays Teams' presence (status) within the app, attempting to correctly use the API to obtain these presence statuses. However, the status obtained on the app side is always displayed as "unknown," preventing the accurate display of presence information. There are no error responses.

I would appreciate any advice on how to resolve this issue under the following circumstances.

Regarding the implementation:

The app I'm developing uses a dual-screen display, with Teams open on one screen and the app operating on the other. Despite being set to an available status on Teams, the app side displays the status as "unknown."

The app obtains status through an API when the user clicks on an icon. The goal is to accurately display the user's status at that moment.

Previously, I implemented the retrieval of Outlook calendar information and am proceeding with the retrieval of Teams' status following that logic. Since responses are being returned, I believe the API itself is functioning correctly.

The system environment is as follows:

Development environment: Mac/Monterey version 12.0.1

Development browser: Chrome

Microsoft Teams version: 24004.1304.2655.7488

Furthermore, permission settings for Presence.Read.All have been completed on the Azure portal, and integration using a Microsoft account is required.

If there are any insights into solving this problem or potential causes related to the development environment, I would greatly appreciate your input. Thank you.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,913 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. awijekoon 1,335 Reputation points Microsoft Vendor
    2024-03-02T04:47:47.99+00:00

    @chikaraN_72

    It may be due to the user never logging in to MS Teams. Have you tried switching the user’s status and checking what the presence API returns?

    Also, you could check the scope by decoding the access token to confirm that it has the correct permissions.


  2. chikaraN_72 0 Reputation points
    2024-03-04T05:50:16.6733333+00:00

    @awijekoon

    Users are logged into Teams, and changing their status does not alter the presence information received:

    
    {
        "presence": {
            "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('{user_email}')/presence/$entity",
            "id": "{user_email}",
            "availability": "PresenceUnknown",
            "activity": "PresenceUnknown",
            "statusMessage": null
        }
    }
    

    Despite being successfully logged into Teams and changing statuses for verification, the presence information returned remains reported as "PresenceUnknown". The scope of the decoded access token includes Presence.Read.All, and my account holds global administrative privileges. Given that all settings appear to be correctly implemented, could you offer any insights or indicate if there are any additional configurations needed to retrieve the expected presence information?

    0 comments No comments

  3. chikaraN_72 0 Reputation points
    2024-03-07T01:05:24.8133333+00:00

    This issue has been resolved.

    The mistake was that I had entered a UPN where a user's ID was required in the path.

    Thank you for your assistance.

    0 comments No comments