Lenz
Lenz

Reputation: 398

How can I know if an entity is a queue or an auto attendand in Teams?

I am querying a Teams customer via Graph, and when I download a record for a call through the Call Record API, I see many participants, each of them referenced by their ID. Some of them appear to be call queues or auto attendants, and if I ask Teams for their /user I will get a record like:

    %{
        "@odata.type": "#microsoft.graph.user",
        businessPhones: [],
        displayName: "Phone Menu",
        givenName: nil,
        id: "xxxx-xxxx-451a-b6a9-ab6ab32744c0",
        jobTitle: nil,
        mail: nil,
        mobilePhone: nil,
        officeLocation: nil,
        preferredLanguage: nil,
        surname: nil,
        userPrincipalName: "phonemenu.pbx@customer"
      }

I can tell that this is a queue or an auto-attendant by looking at their name, but is there a better way of knowing this is not a human?

Upvotes: 1

Views: 402

Answers (1)

user2250152
user2250152

Reputation: 20725

You can expand sessions which represents a list of sessions involved in the call.

GET https://graph.microsoft.com/v1.0/communications/callRecords/{id}?$expand=sessions

Session has caller and callee properties of endpoint resource type.

Endpoint has property userAgent of userAgent type. The clientUserAgent and serviceUserAgent types inherit from this type.

If userAgent is serviceUserAgent type then you can check property role. Some of possible values should be skypeForBusinessCallQueues and skypeForBusinessAutoAttendant.

Upvotes: 1

Related Questions