Quickstart: Enable Message Analysis with Azure OpenAI

Important

Functionality described in this article is currently in public preview. This preview version is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

Azure Communication Services enables you to receive Message Analysis results using your own Azure OpenAI resource.

Prerequisites

Setup

  1. Connect Azure Communication Services with Azure OpenAI Services:

    a. Open your Azure Communication Services resource and click the Cognitive Services tab.

    b. If system-assigned managed identity isn't enabled, you'll need to enable it.

    c. In the Cognitive Services tab, click Enable Managed Identity.

    Screenshot of Enable Managed Identity button.

    d. Enable system assigned identity. This action begins the creation of the identity. A pop-up alert notifies you that the request is being processed.

    Screenshot of enable managed identity.

    e. When managed identity is enabled, the Cognitive Service tab displays a Connect cognitive service button to connect the two services.

    Screenshot of Connect cognitive services button.

    f. Click Connect cognitive service, then select the Subscription, Resource Group, and Resource, and click Connect in the context pane.

    Screenshot of Subscription, Resource Group, and Resource in pane.

  2. Enable Message Analysis:

    a. Go to the Channels page of the Advanced Messaging tab in your Azure Communication Services resource.

    Screenshot that shows the channels page.

    b. Select the channel of your choice to enable Message Analysis on. The system displays a channel details dialog.

    Screenshot that shows the channel details page.

    c. Toggle Allow Message Analysis. Select one of the connected Azure OpenAI services and choose the desired deployment model for the Message Analysis feature. Then click Save.

    Screenshot that shows how to enable Message Analysis.

  3. Set up Event Grid subscription:

    Subscribe to Advanced Message Analysis Completed event by creating or modifying an event subscription. See Subscribe to Advanced Messaging events for more details on creating event subscriptions.

    Screenshot that shows how to create Message Analysis event subscription properties.

  4. See Message Analysis in action

    a. Send a message from WhatsApp Customer to Contoso business phone number.

    b. Receive the Message Analysis event in the Event Grid Viewer that you set up in Step 3. Details on the AdvancedMessageAnalysisCompleted event schema can be found at Azure Communication Services - Advanced Messaging events

    Screenshot that shows Message Analysis event being received at Event Grid Viewer.

Clean up resources

If you want to clean up and remove a Communication Services subscription, you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it. Learn more about cleaning up resources.

Learn more about responsible AI