Muokkaa

Jaa


Troubleshooting in Azure Communication Services

This article helps you troubleshoot issues that you might experience within your Azure Communication Services solution. If you're troubleshooting SMS, you can enable delivery reporting with Azure Event Grid to capture SMS delivery details.

Get help

We encourage developers to submit questions, suggest features, and report problems as issues. For more information, see the dedicated support and help options page.

To help you troubleshoot certain issues, you might need one or more of the following pieces of information:

  • MS-CV ID: Troubleshoot calls and messages.
  • Call ID: Identify Azure Communication Services calls.
  • SMS message ID: Identify SMS messages.
  • Short code program brief ID: Identify a short code program brief application.
  • Toll-free verification campaign brief ID: Identify a toll-free verification campaign brief application.
  • Email message ID: Identify Send Email requests.
  • Correlation ID: Identify requests made by using Call Automation.
  • Call logs: Use the detailed information to troubleshoot calling and network issues.

For more information about throttling and limitations, see Service limits.

Access your MS-CV ID

You can access the MS-CV ID by configuring diagnostics in the clientOptions object instance when you initialize your SDKs. You can configure diagnostics for any Azure SDK, including Chat, Identity, and VoIP calling.

Client options example

The following code snippets demonstrate diagnostics configuration. When you enable diagnostics for SDKs, diagnostics details are emitted to the configured event listener.

// 1. Import Azure.Core.Diagnostics
using Azure.Core.Diagnostics;

// 2. Initialize an event source listener instance
using var listener = AzureEventSourceListener.CreateConsoleLogger();
Uri endpoint = new Uri("https://<RESOURCE-NAME>.communication.azure.net");
var (token, communicationUser) = await GetCommunicationUserAndToken();
CommunicationUserCredential communicationUserCredential = new CommunicationUserCredential(token);

// 3. Setup diagnostic settings
var clientOptions = new ChatClientOptions()
{
    Diagnostics =
    {
        LoggedHeaderNames = { "*" },
        LoggedQueryParameters = { "*" },
        IsLoggingContentEnabled = true,
    }
};

// 4. Initialize the ChatClient instance with the clientOptions
ChatClient chatClient = new ChatClient(endpoint, communicationUserCredential, clientOptions);
ChatThreadClient chatThreadClient = await chatClient.CreateChatThreadAsync("Thread Topic", new[] { new ChatThreadMember(communicationUser) });

Use access IDs for Call Automation

When you troubleshoot issues with the Call Automation SDK, such as call management or recording problems, you need to collect the IDs that help identify the failing call or operation. You can provide either of the following two IDs:

  • From the header of the API response. Locate the field X-Ms-Skype-Chain-Id.

    Screenshot that shows the response header with the X-Ms-Skype-Chain-Id.

  • From the callback events that your application receives after running an action. For example, use CallConnected or PlayFailed to locate the correlation ID.

    Screenshot that shows a call disconnected event with the correlation ID.

In addition to one of these IDs, you need to provide details about the failing use case and the time stamp when the failure occurred.

Access your client call ID

When you troubleshoot voice or video calls, you might need to provide a call ID. Access this value via the id property of the call object.

// `call` is an instance of a call created by `callAgent.startCall` or `callAgent.join` methods
console.log(call.id)

Access your SMS message ID

For SMS issues, you can collect the message ID from the response object.

// Instantiate the SMS client
const smsClient = new SmsClient(connectionString);
async function main() {
  const result = await smsClient.send({
    from: "+18445792722",
    to: ["+1972xxxxxxx"],
    message: "Hello World 👋🏻 via Sms"
  }, {
    enableDeliveryReport: true // Optional parameter
  });
console.log(result); // your message ID is in the result
}

Access your short code program brief ID

Find the program brief ID in the Azure portal in the Short Codes section.

Screenshot that shows a short code program brief ID.


Access your toll-free verification campaign brief ID

Find the program brief ID in the Azure portal in the Regulatory Documents section.

Screenshot that shows a toll-free verification campaign brief ID.


Access your email operation ID

When you troubleshoot email send status or email message status requests, you might need to provide an operation ID. You can access this value in the response.

var emailSendOperation = await emailClient.SendAsync(
    wait: WaitUntil.Completed,
    senderAddress: sender,
    recipientAddress: recipient,
    subject: subject,
    htmlContent: htmlContent);

/// Get the OperationId so that it can be used for tracking the message for troubleshooting
Console.WriteLine($"Email operation id = {emailSendOperation.Id}");

Access support files in the Calling SDK

The Calling SDK provides convenient methods to access the log files. These files can help Microsoft support specialists and engineers. We recommend that you collect these logs when you detect an issue.

Enable and access call logs

Learn how to enable and access call logs.

JavaScript

The Azure Communication Services Calling SDK relies internally on the @azure/logger library to control logging.

Use the setLogLevel method from the @azure/logger package to configure the log output level. Create a logger and pass it into the CallClient constructor.

import { setLogLevel, createClientLogger, AzureLogger } from '@azure/logger';
setLogLevel('verbose');
let logger = createClientLogger('ACS');
const callClient = new CallClient({ logger });

You can use AzureLogger to redirect the logging output from Azure SDKs by overriding the AzureLogger.log method.

You can log to the browser console, a file, or a buffer. You can also send to your own service. If you're going to send logs over the network to your own service, don't send a request per log line because this method adversely affects browser performance. Instead, accumulate logs lines and send them in batches.

// Redirect log output
AzureLogger.log = (...args) => {
    // To console, file, buffer, REST API, etc...
    console.log(...args); 
};

Native SDK (Android/iOS)

For Android, iOS, and Windows, the Azure Communication Services Calling SDK offers access to log files.

For Calling Native SDKs, see the Log file access tutorial.

UI Libraries (Android, iOS)

If you use the Azure Communication Services UI Libraries for Android or iOS, you can solicit user feedback through the built-in support form.

For more information about the support functions of the Calling UI support form, see the Support form integration tutorial. This article shows you how to add the necessary event handler and create a basic client/server implementation for centralized storage of support information. This article describes the path for integrating with the support services that your organization uses.

Build end-to-end support flows in your ACS integrations

Whether you use the Calling SDK or the Calling UI SDK, providing support to your customers is a key component of any robust integration.

The article Providing user support highlights the key considerations at each point of the support feedback loop and provides jumping-off points to learn more.


Find Microsoft Entra information

Use the following procedures to find Microsoft Entra information.

Get a directory ID

To find your directory (tenant) ID, follow these steps:

  1. Sign in to the Azure portal.

  2. On the service menu, select Microsoft Entra ID.

  3. On the Overview page in Microsoft Entra ID, copy the directory ID (Tenant ID) and store it in your application code.

    Screenshot that shows how to copy the Microsoft Entra tenant ID and store it.

Get an application ID

To find your application ID, follow these steps:

  1. Sign in to the Azure portal.

  2. On the service menu, select Microsoft Entra ID.

  3. From App registrations in Microsoft Entra ID, select your application.

  4. Copy the Application (client) ID and store it in your application code.

    Screenshot that shows how to copy the Microsoft Entra application ID and store it.

    You can also find the directory (tenant) ID on the application Overview page.

Get a user ID

To find your user ID, follow these steps:

  1. Sign in to the Azure portal.

  2. On the service menu, select Microsoft Entra ID.

  3. From Users in Microsoft Entra ID, select your user.

  4. On the Profile page for Microsoft Entra users, copy the Object ID and store it in your application code.

    Screenshot that shows how to copy the Microsoft Entra user ID and store it.

Get an immutable resource ID

Sometimes you also need to provide the immutable resource ID of your Azure Communication Services resource. To find it, follow these steps:

  1. Sign in to the Azure portal.

  2. Open your Azure Communication Services resource.

  3. On the service menu, select Overview, and switch to a JSON view.

    Screenshot that shows how to switch an Azure Communication Services resource overview to a JSON view.

  4. On the Resource JSON page, copy the immutableResourceId value, and provide it to your support team.

    Screenshot that shows the Resource JSON page.

Verify Teams license eligibility to use Azure Communication Services support for Teams users

There are two ways to verify your Teams license eligibility to use Azure Communication Services support for Teams users.

Verify via Teams web client

To verify your Teams license eligibility via Teams web client, follow these steps:

  1. Open your browser and go to Teams web client.
  2. Sign in with credentials that have a valid Teams license.
  3. If the authentication is successful and you remain in the https://teams.microsoft.com/ domain, your Teams license is eligible. If authentication fails or you're redirected to the https://teams.live.com/v2/ domain, your Teams license isn't eligible to use Azure Communication Services support for Teams users.

Check your current Teams license via the Microsoft Graph API

You can find your current Teams license by using licenseDetails. The Microsoft Graph API returns the licenses assigned to a user. Follow these steps to use the Graph Explorer tool to view licenses assigned to a user.

  1. Open your browser and go to Graph Explorer.

  2. Sign in to Graph Explorer by using credentials.

    Screenshot that shows how to sign in to Graph Explorer.

  3. In the query box, enter the following API and select Run Query.

    https://graph.microsoft.com/v1.0/me/licenseDetails
    

    Screenshot that shows how to enter an API in Graph Explorer.

    Or you can query for a particular user by providing the user ID by using the following API:

    https://graph.microsoft.com/v1.0/users/{id}/licenseDetails
    
  4. The Response preview pane shows output.

    The response object shown here might be shortened for readability.

    {
        "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('071cc716-8147-4397-a5ba-b2105951cc0b')/assignedLicenses",
        "value": [
            {
                "skuId": "b05e124f-c7cc-45a0-a6aa-8cf78c946968",
                "servicePlans":[
                    {
                        "servicePlanId":"57ff2da0-773e-42df-b2af-ffb7a2317929",
                        "servicePlanName":"TEAMS1",
                        "provisioningStatus":"Success",
                        "appliesTo":"User"
                    }
                ]
            }
        ]
    }
    
  5. Find license details where the servicePlanName property has one of the values in the Eligible Teams Licenses table.