Skip to main content

Overview

This guide provides step-by-step instructions for integrating HiddenLayer with Microsoft Sentinel. Runtime detections will be sent from the HiddenLayer Console to an Azure Log Analytics Workspace for ingestion by Sentinel.

Architecture


Prerequisites

  • Azure subscription with the following permissions:
    • Azure Entra ID: Create and manage app registrations, create client secrets
    • Azure Monitor: Create and manage Data Collection Endpoints (DCE)
    • Azure Monitor: Create and manage Data Collection Rules (DCR)
    • Log Analytics Workspace: Create and manage custom tables
    • Access Control (IAM): Grant role assignments on Data Collection Rules
  • Log Analytics Workspace
  • Azure Sentinel
  • HiddenLayer Console admin access

Setup Steps

Step 1: Register Application in Azure Entra ID

  1. Navigate to Azure PortalMicrosoft Entra IDApp registrations
  2. Click New registration
  3. Enter a name for the application (e.g., hl-sentinel-log-analytics-stage)
  4. Select Accounts in this organizational directory only (Single tenant)
  5. Click Register
  6. Save the following values:
    • Application (client) ID - You’ll need this later
    • Directory (tenant) ID - You’ll need this later

Step 2: Create Client Secret

  1. In your app registration, navigate to Certificates & secrets
  2. Click New client secret
  3. Enter a description (e.g., IntegrationToken) and set expiration (recommended: 180 days or 6 months)
  4. Click Add
  5. IMMEDIATELY COPY THE SECRET VALUE - You cannot view it again after leaving this page
  6. Save this value securely - You’ll need it for HiddenLayer configuration
    Save Secret ValueThis value will not be available once you leave this page. If you leave the page without copying the secret value, you must create a new secret.

Step 3: Create Data Collection Endpoint

  1. Navigate to Azure PortalMonitorData Collection Endpoints
  2. Click Create
  3. Configure the endpoint:
    • Name: hl-sentinel-aidr-<environment> (e.g., hl-sentinel-aidr-stage)
    • Subscription: Select your subscription
    • Resource Group: Select or create a resource group
    • Region: Choose the region closest to your HiddenLayer deployment
  4. Click Review + createCreate
  5. Once created, select the endpoint and click JSON View
  6. Copy the dataCollectionEndpointId - It looks like:
  7. Copy the logsIngestion URL - It looks like:

Step 4: Create Custom Log Analytics Table

  1. Navigate to Azure PortalLog Analytics workspaces
  2. Select your workspace (where Sentinel is enabled)
  3. Navigate to SettingsTables
  4. Click CreateNew custom log (DCR-based)
  5. Configure the custom log:
    • Table name: HiddenLayerAIDRStage (without _CL suffix)
    • Data collection endpoint: Select the endpoint created in Step 3
    • Data collection rule: Create new or select existing
  6. Click Next
  7. Upload the following JSON schema file:
  1. Click NextCreate
    Table and Stream NamesAzure will create a table named HiddenLayerAIDRStage_CL and a stream named Custom-HiddenLayerAIDRStage_CL

Step 5: Get Data Collection Rule Details

  1. Navigate to Azure PortalMonitorData Collection Rules
  2. Find and select the data collection rule created in Step 4
  3. Click JSON View
  4. Copy the immutableId - It looks like:

Step 6: Grant Permissions to App Registration

  1. Stay on the Data Collection Rule page
  2. Navigate to Access Control (IAM)
  3. Click AddAdd role assignment
  4. Select role: Monitoring Metrics Publisher
  5. Click Next
  6. For Assign access to, select User, group, or service principal
  7. Click Select members
  8. Search for your app registration name (from Step 1)
  9. Select the application
  10. Click SelectReview + assignReview + assign

Step 7: Configure HiddenLayer Console

  1. Log in to HiddenLayer Console
  2. Navigate to AdminIntegrations
  3. Find Azure Sentinel and click Configure Integration (three dots menu)
  4. Enter the following values:
  5. Click Submit

Configuration Summary

Key Configuration Mapping

What you create in Azure Portal:
  • Table name: HiddenLayerAIDRStage (no suffix)
What Azure automatically creates:
  • Log Analytics table: HiddenLayerAIDRStage_CL (adds _CL suffix)
  • DCR stream: Custom-HiddenLayerAIDRStage_CL (adds Custom- prefix and _CL suffix)
What you configure in HiddenLayer:
  • Table name: Custom-HiddenLayerAIDRStage_CL (the full stream name)

Critical Field Clarifications


Verification (Wait 5-10 minutes after configuration)

Step 1: Create an AI Runtime Security detection

  1. In HiddenLayer Console, navigate to LLM Sandbox
  2. Select OWASP Scenarios -> LLM01: Prompt Injection
  3. Turn on Block Prompt Injection in the Policy Settings
  4. Send the prompt
  5. You should see a message saying the prompt was blocked

Step 2: Check Azure for Errors

Run this query in Log Analytics:
Expected result: No errors If errors exist: See Troubleshooting section below

Step 3: Verify Data Ingestion

Run this query in Log Analytics:
Expected result: Conviction data appears in the table

Testing the Integration

If you want to manually test the Azure configuration before HiddenLayer sends data, use this Python script:

Test Script

Save as test_integration.py:
Install dependencies:
Run test:

Troubleshooting

Issue 1: Stream Not Configured Error

Error in DCRLogErrors:
Cause: Incorrect table name in HiddenLayer Console Solution: Correct configuration:
  • Azure Portal table name: HiddenLayerAIDRStage
  • HiddenLayer Console table name: Custom-HiddenLayerAIDRStage_CL
Incorrect configurations:
  • HiddenLayerAIDRStage_CL (missing “Custom-” prefix)
  • HiddenLayerAIDRStage (missing both prefix and suffix)
  • HiddenLayerAIDRStage_CL_CL (double suffix - table created incorrectly)

Issue 2: Authentication Failures

Error: No data in table Possible causes:
  1. Incorrect Client ID or Client Secret
  2. Expired Client Secret
  3. Missing role assignment
Solutions: Verify credentials:
Check role assignment:
  1. Go to Data Collection Rule → Access Control (IAM)
  2. Verify app has “Monitoring Metrics Publisher” role
  3. If missing, add the role (see Step 6)
Regenerate secret:
  1. Go to App Registration → Certificates & secrets
  2. Create new client secret
  3. Update HiddenLayer configuration immediately

Issue 3: No Data Appearing

Symptom: No errors in DCRLogErrors, but no data in table Possible causes:
  1. No convictions being generated
  2. Integration not properly activated
  3. Timing delay
Solutions: Check for detections:
  • HiddenLayer Console → AI Runtime Security → Detections
  • Look for detections in the last 24 hours
Trigger test detection:

Diagnostic Queries

Check for Integration Errors

Check Data Ingestion Rate

Check Conviction Severity Distribution

Find Recent High Severity Convictions


Additional Resources

Microsoft Documentation


Quick Reference Card

Use this for easy reference: