Azure Communication Services: Integration Guide

Azure Communication Services (ACS) exposes the same backend that powers Microsoft Teams as a set of APIs. You can now build SMS, Chat, Voice, and Video capabilities directly into your applications without managing SIP trunks or WebSocket servers.

Sending an SMS

string connectionString = "endpoint=https://...";
SmsClient smsClient = new SmsClient(connectionString);

SmsSendResult sendResult = await smsClient.SendAsync(
    from: "+18005550100",
    to: "+12065550100",
    message: "Your verification code is 123456"
);

Console.WriteLine($"Message ID: {sendResult.MessageId}");

User Access Tokens

To access Chat or VoIP, users need a token.

var client = new CommunicationIdentityClient(connectionString);
var user = await client.CreateUserAsync();
var token = await client.GetTokenAsync(user, scopes: new[] { CommunicationTokenScope.Chat });

// Pass 'token' to the frontend JS SDK

Key Takeaways

  • ACS is fully managed; no infrastructure to scale.
  • Integrates with **Event Grid** for incoming call/message notifications.
  • Interoperable with Microsoft Teams users (Preview).

Discover more from C4: Container, Code, Cloud & Context

Subscribe to get the latest posts sent to your email.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.