Azure
Azure Integration Setup Guide
Complete guide for integrating Azure with CyberOptix.
Prerequisites
- Azure CLI installed (Installation Guide)
- Global Administrator or Privileged Role Administrator access to Microsoft Entra ID
- Owner or User Access Administrator role on Azure subscriptions
Part 1: Create Azure Service Principal
Step 1: Retrieve Management Group ID
Get your root-level Management Group ID. Learn more about Azure Management Groups.
Alternative: Use a Subscription ID if you prefer subscription-level scope instead of management group scope.
Step 2: Create Service Principal with Required Roles
# Set your Management Group ID
MG_ID="your-management-group-id"
# Login to Azure
az login
# Create Service Principal with Reader role
SP_OUTPUT=$(az ad sp create-for-rbac \
-n 'CyberOptix Integration' \
--role reader \
--scopes "/providers/Microsoft.Management/managementGroups/${MG_ID}" \
--output json)
# Display credentials
echo $SP_OUTPUT | jq
# Extract Client ID
APP_ID=$(echo $SP_OUTPUT | jq -r '.appId')
# Add Storage Blob Data Reader role
az role assignment create \
--assignee $APP_ID \
--role "Storage Blob Data Reader" \
--scope "/providers/Microsoft.Management/managementGroups/${MG_ID}"For subscription-level access, replace the scope:
--scopes "/subscriptions/{subscription-id}"Step 3: Save Service Principal Credentials
From the output, save these values securely:
| Field | Description | Example |
|---|---|---|
appId | Client ID | 22d5376c-d430-45b0-8602-9b4f7bda45bf |
password | Client Secret | abc123...xyz |
tenant | Tenant ID | 286e1165-d2c4-4cc7-a73d-fd68cf040d61 |
Warning: The Client Secret is only displayed once. Store it securely.
Step 4: Verify Role Assignments
az role assignment list \
--assignee $APP_ID \
--scope "/providers/Microsoft.Management/managementGroups/${MG_ID}" \
--output tableConfirm both Reader and Storage Blob Data Reader roles are listed.
Part 2: Configure Microsoft Graph API Permissions
Required for Microsoft Entra ID, Microsoft 365 log collection, and Intune.
Step 1: Open App Registration
- Navigate to Azure Portal → Microsoft Entra ID → App registrations
- Search for and select CyberOptix Integration
Step 2: Add Microsoft Graph Permissions
- Select API permissions → + Add a permission
- Choose Microsoft Graph → Application permissions
- Add these permissions:
Audit & Security Logs:
AuditLog.Read.AllIdentityRiskEvent.Read.AllSecurityAlert.Read.All
Entra ID Entity Sync:
User.Read.AllGroup.Read.AllApplication.Read.AllRoleManagement.Read.DirectoryPolicy.Read.ConditionalAccess
Intune Audit Logs:
DeviceManagementApps.Read.All
- Click Add permissions
Step 3: Grant Admin Consent
- Click Grant admin consent for [Your Organization]
- Click Yes to confirm
Critical: Without admin consent, log collection and entity sync will not function.
Step 4: Verify Permissions
Confirm all permissions show Granted status with a green checkmark in the Status column.
Part 3: Configure Microsoft Defender for Endpoint API Permissions
Required for Defender for Endpoint (EDR) device and vulnerability sync.
Step 1: Add Defender API Permissions
- In App registrations → CyberOptix Integration → API permissions
- Click + Add a permission → APIs my organization uses
- Search for WindowsDefenderATP and select it
- Choose Application permissions
- Add these permissions:
Machine.Read.AllVulnerability.Read.AllSoftware.Read.AllSecurityRecommendation.Read.All
- Click Add permissions
- Click Grant admin consent for [Your Organization]
Note: Microsoft Defender for Endpoint requires a Defender for Endpoint Plan 2 or Microsoft 365 E5 license.
Part 4: Configure Office 365 Management API Permissions
Required for M365 Management Activity log collection (Exchange, SharePoint, and Teams audit logs).
Step 1: Add Office 365 Management API Permissions
- In App registrations → CyberOptix Integration → API permissions
- Click + Add a permission → APIs my organization uses
- Search for Office 365 Management APIs and select it
- Choose Application permissions
- Add this permission:
ActivityFeed.Read
- Click Add permissions
- Click Grant admin consent for [Your Organization]
Note: M365 Management Activity covers Exchange, SharePoint, and Teams audit events. DLP content types require E5 licensing and are not collected by default.
Part 5: Configure Power Platform API Permissions
Required for Power Platform environment, app, connector, connection, DLP policy, and Power Automate flow discovery.
Step 1: Assign Power Platform Administrator Role
The service principal must have the Power Platform Administrator role in Microsoft Entra ID. This role grants admin-level access to the Power Platform admin APIs — no granular API permissions are needed in the app registration.
- Navigate to Azure Portal → Microsoft Entra ID → Roles and administrators
- Search for Power Platform Administrator and select it
- Click + Add assignments
- Search for CyberOptix Integration (the service principal)
- Select it and click Next → Assign
Note: Alternatively, the Dynamics 365 Administrator role also grants the necessary access.
Step 2: Add Power Apps Admin API Permission
Some tenants require an explicit API permission entry for the Power Platform admin scope:
- In App registrations → CyberOptix Integration → API permissions
- Click + Add a permission → APIs my organization uses
- Search for Power Platform API (or PowerApps Service) and select it
- Choose Application permissions → Check User (or available admin scopes)
- Click Add permissions
- Click Grant admin consent for [Your Organization]
Step 3: Verify Access
After role assignment, the service principal will have access to:
- Power Platform Admin API (
api.powerplatform.com) — environments, apps, app permissions, custom connectors, connections, DLP policies - Flow Service API (
service.flow.microsoft.com) — Power Automate flow inventory and details
Note: Power Automate flow discovery uses a separate token scope (
service.flow.microsoft.com/.default). If the Flow Service token cannot be acquired, CyberOptix will still discover all other Power Platform entities and log a warning.
Part 6: Configure Azure DevOps Access
Required only if using the DevSecOps module.
Step 1: Add Azure DevOps API Permission
- In App registrations → CyberOptix Integration → API permissions
- Click + Add a permission → Azure DevOps
- Select Delegated permissions → Check user_impersonation
- Click Add permissions
- Click Grant admin consent for [Your Organization]
Step 2: Add Service Principal to Azure DevOps
- Navigate to
https://dev.azure.com/{your-organization} - Click Organization Settings (bottom left) → Users → Add users
- Enter the Service Principal Client ID from Part 1, Step 3
- Set Access level to Basic
- Click Add
Step 3: Grant Project Access
Option A - Specific Projects:
- Go to Organization Settings → Projects
- Select a project → Permissions tab
- Add the Service Principal to the Readers group
- Repeat for each project
Option B - All Projects:
- Go to Organization Settings → Permissions
- Add the Service Principal to the Project Collection Readers group
Part 7: Add Integration to CyberOptix
Step 1: Navigate to Integrations
- Log in to CyberOptix
- Navigate to Integrations → Available Integrations
Step 2: Create Azure Integration
- Select Azure as the integration type
- Choose Cloud as the integration mode
- Enter the credentials from Part 1, Step 3:
- Client ID: The
appIdvalue - Client Secret: The
passwordvalue - Tenant ID: The
tenantvalue
- Client ID: The
- Click Submit
Step 3: Verify Integration
The integration will appear in your Active Integrations list. CyberOptix will begin discovering Azure resources within a few minutes.
Permission Summary
Azure RBAC Roles
| Role | Scope | Purpose |
|---|---|---|
| Reader | Management Group or Subscription | Discover Azure resources and read Activity Logs |
| Storage Blob Data Reader | Management Group or Subscription | Access storage containers and blobs |
Microsoft Graph API Permissions
| Permission | Type | Purpose |
|---|---|---|
| AuditLog.Read.All | Application | Entra ID sign-in, provisioning, and directory audit logs |
| IdentityRiskEvent.Read.All | Application | Identity Protection risk detections |
| SecurityAlert.Read.All | Application | Microsoft 365 Defender security alerts |
| User.Read.All | Application | Entra ID user entity sync |
| Group.Read.All | Application | Entra ID group and membership sync |
| Application.Read.All | Application | Entra ID app registration and service principal sync |
| RoleManagement.Read.Directory | Application | Entra ID directory role and assignment sync |
| Policy.Read.ConditionalAccess | Application | Entra ID Conditional Access policy sync |
| DeviceManagementApps.Read.All | Application | Intune device management audit logs |
Microsoft Defender for Endpoint API Permissions
| Permission | Type | Purpose |
|---|---|---|
| Machine.Read.All | Application | Defender-managed device inventory |
| Vulnerability.Read.All | Application | Endpoint vulnerability detections |
| Software.Read.All | Application | Endpoint software inventory |
| SecurityRecommendation.Read.All | Application | Defender security recommendations |
Office 365 Management API Permissions
| Permission | Type | Purpose |
|---|---|---|
| ActivityFeed.Read | Application | Exchange, SharePoint, and Teams management activity logs |
Power Platform Permissions
| Permission / Role | Type | Purpose |
|---|---|---|
| Power Platform Administrator | Entra Role | Admin access to Power Platform APIs (environments, apps, etc.) |
api.powerplatform.com | Token Scope | Environments, apps, connectors, connections, DLP policies |
service.flow.microsoft.com | Token Scope | Power Automate flow inventory and details |
Azure DevOps Permissions
| Permission | Type | Purpose |
|---|---|---|
| user_impersonation | Delegated | Access Azure DevOps APIs |
| Basic | Access Level | Minimum required for API access |
| Readers | Group | Read projects, repositories, and branches |
Data Collection Overview
CyberOptix performs read-only operations on the following resources:
Azure Infrastructure:
- Virtual machines, networks, subnets, NICs, public IPs
- Storage accounts, blob containers, blobs
- Load balancers, application gateways, Azure Firewalls
- Databases (SQL, CosmosDB, PostgreSQL, MySQL)
- Container instances, AKS clusters
- App Services, Front Door CDN
Azure Activity Logs:
- Subscription-level control plane operations (resource create, update, delete)
- Administrative actions, service health events, and policy evaluations
- Autoscale events and security recommendations
Microsoft Entra ID:
- User sign-in and provisioning logs
- Directory audit logs
- Identity Protection risk detections
- User, group, and membership inventory
- App registrations and service principals
- Conditional Access policies
- Directory roles and role assignments
Microsoft 365:
- Defender security alerts
- Exchange audit events (mailbox access, admin changes, mail flow)
- SharePoint audit events (file access, sharing, site changes)
- Teams audit events (channel management, meeting events)
Microsoft Defender for Endpoint:
- Managed device inventory (OS, health, risk level, exposure)
- Endpoint vulnerabilities (CVE mappings per device)
- Software inventory across managed devices
- Security recommendations and remediation status
Power Platform:
- Environment inventory (type, region, lifecycle status)
- Power Apps inventory (creator, sharing, connection references per environment)
- App role assignments for broadly shared apps
- Custom connector inventory (endpoints, authentication types)
- Connection inventory (credential instances, status, creator, API bindings)
- Data Loss Prevention (DLP) policies
- Power Automate flow inventory (triggers, actions, connection references, state)
Microsoft Intune:
- Device management audit events (compliance changes, app deployments)
- Configuration profile updates and policy changes
- Administrative actions and role-based access changes
Azure DevOps:
- Projects, Git repositories, branches
Additional Resources
- Azure Service Principal Documentation
- Microsoft Graph Permissions Reference
- Microsoft Defender for Endpoint API Documentation
- Office 365 Management Activity API Reference
- Power Platform Admin API Reference
- Power Automate Management API Reference
- Microsoft Intune API Documentation
- Azure DevOps Security Best Practices
Updated 2 months ago