getAllSessions (JavaScript API Reference) for Dynamics 365 Channel Integration Framework 2.0

Note

This content applies only to Dynamics 365 Channel Integration Framework version 2.0.

Note

Session management APIs allow you to integrate multisession experiences in Customer Service workspace app only.

Returns an array of session identifiers for a provider.

Syntax

Microsoft.CIFramework.getAllSessions().then(successCallback, errorCallback);

Parameters

Name Type Required Description
successCallback Function No Call when the promise is resolved
errorCallback Function No Call when the promise is rejected

Return value

Promise with the value as array of session IDs, which are created by the provider and still at active state.

Example

Microsoft.CIFramework.getAllSessions().then(
    function (result) {
        // result will have array of session Ids, which are created by the provider and still at active state.
        console.log(result)
    },
    function (error) {
        // code handling for promise failure
        console.log(error)
    });