Show / Hide Table of Contents

    Graph Communications SDK

    This SDK is the core component of Communications SDK. This contains all the standard features and functionality available in the Graph Stateful SDK.

    Authentication Provider

    All calls made and received by the SDK must be authenticated by the bot developers. The SDK requires the developers to implement the IRequestAuthenticationProvider interface and specify it when building the ICommunicationsClient.

    There are two parts to the interface.

    • AuthenticateOutboundRequestAsync: This method should add the Authorization header to the outbound HTTP requests from the SDK.
    • AuthenticateOutboundRequestAsync: This method should validate the Authorization header for incoming HTTP requests from Graph, extract the Tenant ID from that header and provide it to the SDK.

    Examples of the Authentication Provider can be found in samples.

    Notification Handling

    1. The Graph Platform sends out notifications via HTTP that need to be handled by the Bot Developers. The Platform sends out notifications on the notification url, and the bot developers should listen to HTTP messages on that url.
    2. Once the HTTP message has been received by the developer, they need to forward the message to ICommunicationsClient using the ProcessNotificationAsync method.
    3. The SDK processes the notification, calls the IRequestAuthenticationProvider and raises any corresponding events asynchronously.
    4. The SDK then returns a HttpResponseMessage that needs to be sent out as a response to the Graph Platform.
    Note

    Developers using ASP.NET Core should convert the HttpRequest object into HttpRequestMessage before passing it to the SDK. Also, they need to convert the resulting HttpResponseMessage into HttpResponse.


    Select a class on the left to dive into the reference docs

    Accompanying Information

    Accessing the Microsoft Teams Service through a Microsoft API Cloud Video Interop (CVI) partners and contact centers may integrate with Microsoft Teams to aid their solution. Contact centers may route calls to Microsoft Teams but may not build a separate or independent communications related solution while using Microsoft Teams as a base for the solution.

    Back to top Copyright (c) Microsoft Corporation. All rights reserved.