Microsoft Entra ID Integration
Microsoft Entra ID (formerly Azure Active Directory) is Microsoft's cloud-based identity and access management service. LangGuard integrates with Entra ID to enrich trace data with user information and support identity governance.
Overview
The Microsoft Entra ID integration enables LangGuard to:
- Enrich traces with user identity — Map API keys and session IDs to real users
- Track user-level AI usage — See which users are using which AI tools
- Group-based access analysis — Understand AI usage by team and department
- Support identity governance — User access reviews and permission tracking
SSO vs Identity Integration
This integration is for user enrichment and governance. If you want to configure Entra ID for Single Sign-On (login), see SSO Settings.
Prerequisites
- Microsoft Entra ID (Azure AD) tenant
- Azure AD application with Microsoft Graph API permissions
- LangGuard admin role
Setup
Step 1: Register an Application in Azure
- Navigate to the Azure Portal
- Go to Azure Active Directory > App registrations
- Click New registration
- Name it "LangGuard Identity Integration"
- After creation, note the Application (client) ID and Directory (tenant) ID
Step 2: Configure API Permissions
- In the app registration, go to API permissions
- Click Add a permission > Microsoft Graph
- Add the following Application permissions:
User.Read.All— Read all users' profilesGroup.Read.All— Read all groupsDirectory.Read.All— Read directory data
- Click Grant admin consent
Step 3: Create a Client Secret
- Go to Certificates & secrets
- Click New client secret
- Set an expiration period
- Copy the secret value immediately
Step 4: Add Integration in LangGuard
- Navigate to Integrations in the sidebar
- Click Add Integration
- Select Identity Platforms > Microsoft Entra ID
- Enter:
- Name: A friendly name (e.g., "Corporate Entra ID")
- Tenant ID: Your Azure AD tenant ID
- Client ID: The application (client) ID
- Client Secret: The client secret value
- Click Test Connection
- Click Save
What Gets Captured
User Information
| Field | Description |
|---|---|
| Display Name | User's full name |
| Primary email address | |
| Job Title | Role or job title |
| Department | Organizational department |
| Manager | Reporting manager |
| Account Status | Active or disabled |
Group Memberships
- Security groups the user belongs to
- Distribution groups
- Microsoft 365 groups
- Role assignments
How Enrichment Works
LangGuard matches users from Entra ID to AI activity by:
- Mapping email addresses from trace metadata to Entra ID user profiles
- Resolving API keys to their associated users
- Enriching the Discovery view with user and department context
Troubleshooting
Authentication Failed
- Verify the Tenant ID, Client ID, and Client Secret are correct
- Check that the client secret hasn't expired
- Ensure admin consent was granted for the required permissions
Users Not Appearing
- Confirm the API permissions include
User.Read.All - Verify admin consent was granted (not just requested)
- Check that users exist in the specified tenant
Groups Not Syncing
- Confirm the API permissions include
Group.Read.All - Verify the application has admin consent
- Check that groups are not restricted by Azure AD policies
Next Steps
- Integrations Overview — See all available integrations
- Discovery — View user access summaries
- SSO Settings — Configure Entra ID for login