Get started with cloud communications

The cloud communications APIs in Microsoft Graph add a new dimension to how your apps and services interact with users through various communications related features, such as calling and online meetings. This article describes how you can use bots to respond to your customers' needs and facilitate collaboration.

Prerequisites

Beore you get started, it will be helpful to familiarize yourself with the following:

Register a bot

The terms "service application" and "bot" can be used interchangeably. You can either create a bot through the Azure portal directly or register a bot that isn't hosted on Azure. For more details about the bot registration process, see Registering a calling bot.

To make things easier later, it's helpful to understand the different types of permissions within Azure AD. Apps with delegated permissions require a signed-in user. Application-based permissions don't need a signed-in user, and can often run as a background service.

After you register your bot, if you'd like to add your bot to Microsoft Teams, make sure you understand how to use app studio and define the required metadata.

Manage the state of the bot

After you register your bot, decide whether you want your audio and video-based media to be application-hosted or service-hosted. At a high level, this involves deciding whether or not you want to access a live-stream of raw media.

Next, you can decide whether it's best for your bot to be stateful or stateless.

Stateless bots

Any virtual machine can handle any bot instance, which means that if one machine goes down, another can take care of it. This makes for a resilient solution.

On the other hand, a shared cache, such as REDIS, needs to be accessible to all the virtual machines.

Stateful bots

A virtual machine can handle only one bot instance at a time. Because all the states are on one machine, there aren't any extra memory checks or REDIS cache checks.

The drawback is that because the bot instance is just on one machine, it isn't as resilient.

Note: Service-hosted media bots can be stateful or stateless. Application-hosted media bots must be stateful in order to use the Bot Media SDK.

Use the SDKs

The following SDKs are available in C#. We will provide support for other languages in the future.

Examples

Learn how to implement different scenarios using stateful bots, such as answering an incoming call with either application-hosted or service-hosted media.

For more examples, see the Communications samples repository.

Privacy and compliance

In the requests to our APIs, sensitive data should not be sent in any client-side generated IDs (such as scenario IDs, request IDs, or other correlation IDs) in headers or the request body. These IDs will be logged on the server side for diagnostics.