callRecord: getPstnCalls

Namespace: microsoft.graph.callRecords


APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Get log of PSTN calls as a collection of pstnCallLogRow entries.


One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from most to least privileged)
Delegated (work or school account) Not supported.
Delegated (personal Microsoft account) Not supported.
Application CallRecords.Read.All

HTTP request

GET /communications/callRecords/getPstnCalls

Function parameters

In the request URL, provide the following query parameters with values. The following table shows the parameters that can be used with this function.

Parameter Type Description
fromDateTime DateTimeOffset Start of time range to query. UTC, inclusive.
Time range is based on the call start time.
toDateTime DateTimeOffset End of time range to query. UTC, inclusive.

Request headers

Name Description
Authorization Bearer {token}. Required.


If successful, this function returns a 200 OK response code and a collection of pstnCallLogRow entries in the response body.

If there are more than 1000 entries in the date range, the body also includes an @odata.NextLink with a URL to query the next page of call entries. The last page in the date range does not have @odata.NextLink. For more information, see paging Microsoft Graph data in your app.





Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK

    "@odata.context": "$metadata#Collection(microsoft.graph.callRecords.pstnCallLogRow)",
    "@odata.count": 1000,
    "value": [{
            "id": "9c4984c7-6c3c-427d-a30c-bd0b2eacee90",
            "callId": "1835317186_112562680@",
            "userId": "db03c14b-06eb-4189-939b-7cbf3a20ba27",
            "userPrincipalName": "",
            "userDisplayName": "Richard Malk",
            "startDateTime": "2019-11-01T00:00:08.2589935Z",
            "endDateTime": "2019-11-01T00:03:47.2589935Z",
            "duration": 219,
            "charge": 0.00,
            "callType": "user_in",
            "currency": "USD",
            "calleeNumber": "+1234567890",
            "usageCountryCode": "US",
            "tenantCountryCode": "US",
            "connectionCharge": 0.00,
            "callerNumber": "+0123456789",
            "destinationContext": null,
            "destinationName": "United States",
            "conferenceId": null,
            "licenseCapability": "MCOPSTNU",
            "inventoryType": "Subscriber"
    "@odata.nextLink": ",to=2019-12-01)?$skip=1000"

See also