Microsoft allows you to stream your Azure AD DS event logs to external auditing and monitoring tools using Azure Event Hubs. Before you configure streaming, you need to create an Event Hubs namespace and an event hub.
Create an Event Hubs namespace
To create an Event Hubs namespace:
- Login to the Azure portal using your Microsoft account.
- Search for Event Hubs using the search bar on the top menu.
- Select Event Hubs and click + Create on the toolbar to go to the Create Namespace page.
- Select the Subscription in which you want to create the namespace.
- Select an existing Resource group from the drop-down or click Create new and enter the name of the new resource group.
- Specify the Namespace name and select a Location for the namespace.
Note: The resource group and the location of the Event Hubs namespace should be the same as that of the Azure AD DS domain.
- Choose a Pricing tier based on your requirements.
- Leave the Throughput units (for standard tier) or Processing units (for premium tier) setting as it is.
- Click Review + Create.
- Review the settings, select Create, and wait for the deployment to complete.
- Select Go to resource on the deployment page to navigate to the Event Hubs Namespace you just created.
Create an event hub
To create an event hub within the namespace:
- Select Event Hubs from the left menu on the Event Hubs Namespace page.
- Select + Event Hub from the tool bar to go to the Create Event Hub page.
- Enter a Name for your event hub and set the values for Partition Count and Message Retention based on your tier and requirements.
- Enable Capture Details from the Capture tab if required.
- Click Review + create.
- Review the settings, select Create and wait for the deployment to complete. On completion, you will find your Event Hub instance listed in your Event Hubs namespace.
- Click the event hub you created, select Shared access policies on the left menu and click +Add from the toolbar.
- In the Add SAS Policy panel, enter a suitable Policy name, check Listen and click Create.
- Select the policy you just created and copy the Connection string–primary key to your clipboard. This key will be required when adding the Azure AD DS domain in ADAudit Plus.
Configure Azure AD DS to stream events to EventHub
- In the Azure portal, go to Azure AD Domain Services and select your domain.
- Click Diagnostic settings under Monitoring from the left menu.
- Click + Add diagnostic setting to go to the Diagnostic setting page and specify a suitable name for the setting.
- Check audit to select all the Categories under Logs.
- Check Stream to an event hub under Destination details and verify the information about your Subscription, Event hub namespace, and Event hub name.
- Ensure that RootManageSharedAccessKey is selected from the Event hub policy name drop-down.
- Click Save on the toolbar.