---
title: Add Azure event provider to .NET Core application
slug: cms-12/docs/how-to-add-azure-event-provider-to-your-net-core-application
docTags: 
createdAt: 2026-08-10T15:56:04.000Z
---

:::hint{type="info"}
**Note**
You need to add the `EPiServer.Azure` package to your solution, which has the extension methods on the `IServiceCollection` interface.
:::

The following example shows how to add the Azure Event Provider to an Optimizely Content Management System (CMS) application.

```csharp
using Microsoft.Extensions.DependencyInjection;
using System;

namespace SampleBlob {
  public class Startup {
    public void ConfigureServices(IServiceCollection services) {
      services.AddAzureEventProvider(o => {
        o.ConnectionString = "{The Azure event connection string}";
        o.TopicName = "{The topic name}";
        o.SubscriptionName = "{Subscription name}"; // Set to the local machine name if not set
      });
    }
  }
}
```

:::hint{type="info"}
**Note**
This document does not apply to Optimizely Digital Experience Platform (DXP) CMS 12 customers. Instead they should follow the steps on [Create and deploy a CMS site](docId\:RIn0cobbPnEmEafa16av8); specifically, the `EPiServer.CloudPlatform.Cms package`, and associated startup code steps to hook up to the event system in Azure.
:::
