NetBird Full API Reference + Read-Only MCP Prototype
POST/api/integrations/azure-idp

Create an Azure IDP integration

Creates a new Azure AD identity provider integration. Supply the required Azure application credentials and tenant details, and use sync_interval to configure synchronization frequency; it defaults to 300 seconds when omitted. The response includes the created integration and its generated identifier.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

8 body fields

Azure AD identity provider integration configuration. client_secret, client_id, tenant_id, and host are required.

connector_idstringoptional
DEX connector ID for embedded IDP setups
group_prefixesarray<string>optional
List of start_with string patterns for groups to sync
user_group_prefixesarray<string>optional
List of start_with string patterns for groups which users to sync
client_idstringrequired
Azure AD application (client) ID
client_secretstringrequired
Base64-encoded Azure AD client secret
hoststringrequired
Azure host domain for the Graph API
Allowed:microsoft.commicrosoft.us
sync_intervalintegeroptional
Sync interval in seconds (minimum 300). Defaults to 300 if not specified.
tenant_idstringrequired
Azure AD tenant ID

4 status codes
200Returns the created integration, including its identifier, configuration, enabled status, and last synchronization time.
enabledbooleanrequired
Whether the integration is enabled
connector_idstringoptional
DEX connector ID for embedded IDP setups
group_prefixesarray<string>required
List of start_with string patterns for groups to sync
user_group_prefixesarray<string>required
List of start_with string patterns for groups which users to sync
client_idstringrequired
Azure AD application (client) ID
hoststringrequired
Azure host domain for the Graph API
idintegerrequired
The unique identifier for the integration
last_synced_atstringrequired
Timestamp of the last synchronization
sync_intervalintegerrequired
Sync interval in seconds
tenant_idstringrequired
Azure AD tenant ID
400Returned when the JSON is invalid, a required field is missing, or a value fails validation.
messagestringoptional
A human-readable error message.
401Returned when authentication is missing or invalid.
messagestringoptional
A human-readable error message.
500Returned when an internal server error occurs.
messagestringoptional
A human-readable error message.

Error handling

The request must include client_secret, client_id, tenant_id, and host; host must be microsoft.com or microsoft.us, and sync_interval must be at least 300 seconds if provided. Invalid JSON, missing required fields, or validation failures return a 400; missing or invalid authentication returns a 401. A 500 indicates an internal server error.