continueops_sso_connection (Resource)
A SAML single sign-on connection for the tenant (Settings → Single sign-on). People signing in through it are matched on email_attribute, and optionally on directory_id_attribute to the people imported into ContinueOps; the groups the IdP sends in groups_attribute drive continueops_sso_group_mapping and the group subjects of continueops_rbac_binding.
Give your IdP the computed sp_entity_id, acs_url (or the whole sp_metadata_url); people then sign in at sign_in_url.
metadata_xml is write-only. The platform never returns it, so Terraform keeps the value from your configuration in state and sends it again only when it changes; it cannot see metadata replaced in the console. After terraform import, metadata_xml is null, so the next apply re-sends the configured metadata once. Changing or switching between metadata_url and metadata_xml is an in-place update.
Needs a tenant owner or administrator API key. Destroy deletes the connection and its group mappings: people can no longer sign in through it.
Example Usage
# SAML sign-in through an Entra ID enterprise application. Give Entra the
# computed sp_entity_id (Identifier) and acs_url (Reply URL); people then sign
# in at sign_in_url. Entra names its claims with URIs.
resource "continueops_sso_connection" "entra" {
name = "Acme Entra ID"
# The application's own metadata (?appid=), which carries its signing certificate.
metadata_url = "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/federationmetadata/2007-06/federationmetadata.xml?appid=11111111-1111-1111-1111-111111111111"
email_attribute = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
directory_id_attribute = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/employeeid" # a custom claim from user.employeeid
groups_attribute = "http://schemas.microsoft.com/ws/2008/06/identity/claims/groups" # group object ids
default_role = "member"
mfa_handled_by_idp = true # Entra ID's Conditional Access enforces MFA
}
output "acs_url" {
value = continueops_sso_connection.entra.acs_url
}
# Or with the metadata document itself (write-only: never returned by the API).
resource "continueops_sso_connection" "okta" {
name = "Acme Okta"
metadata_xml = file("${path.module}/okta-metadata.xml")
}Entra ID
An Entra ID enterprise application (non-gallery, SAML) works with these settings. A complete configuration that creates the Entra side with the azuread provider is in examples/entra-id.
| In ContinueOps | Set to | Entra side |
|---|---|---|
metadata_url |
https://login.microsoftonline.com/<tenant-id>/federationmetadata/2007-06/federationmetadata.xml?appid=<application-id> |
The application's own metadata. Without ?appid= it is the tenant-wide document, which doesn't carry the application's signing certificate. |
email_attribute |
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress |
user.mail, a default claim. If mail is empty for some staff, use http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name (user.userprincipalname). |
directory_id_attribute |
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/employeeid |
A custom claim from user.employeeid (not sent by default). http://schemas.microsoft.com/identity/claims/objectidentifier is sent by default if you match on object id instead. |
groups_attribute |
http://schemas.microsoft.com/ws/2008/06/identity/claims/groups |
Add a group claim: Groups assigned to the application, source Group ID. |
default_role |
member |
Anyone whose groups don't map, and anyone over the group limit, gets this. |
Give Entra the computed sp_entity_id as the Identifier (Entity ID) and acs_url as the Reply URL (Assertion Consumer Service URL).
Things that behave differently from an on-premises directory:
- Claim names are URIs. Attribute names are matched exactly (ignoring case), so
groupsdoesn't match Entra's group claim unless an admin renamed it. Terraform warns when the metadata is Entra's andgroups_attributeisn't a URI. - Groups arrive as object ids (GUIDs), one value per group. Map them by object id in
continueops_sso_group_mappingandcontinueops_rbac_binding.subject_group; matching ignores case. sAMAccountName values are only available for groups synced from on-premises AD, and cloud-only display names only with "Groups assigned to the application". Display names aren't unique in Entra, so prefer object ids. - Over 150 groups, Entra leaves the groups out of a SAML assertion and sends
http://schemas.microsoft.com/claims/groups.linkinstead. ContinueOps then sees no groups: the person keepsdefault_role, an admin granted by a mapping is demoted, and group bindings stop applying until a sign-in that carries groups. This fails closed. "Groups assigned to the application" avoids it, because only the assigned groups are counted. - Assigned groups aren't expanded. Staff must be direct members of a group assigned to the application; nested groups aren't assigned. Assigning groups needs Entra ID P1 or P2.
- App roles instead of groups. Set
groups_attributetohttp://schemas.microsoft.com/ws/2008/06/identity/claims/roleand use app role values (such asContinueOps.Admin) asexternal_groupandsubject_group. Entra sends the roles assigned to the person directly or through a group. - One connection per Entra tenant. Every application in an Entra tenant has the same IdP entity id,
https://sts.windows.net/<tenant-id>/, and ContinueOps registers each entity id once. A second connection from the same Entra tenant is refused with a conflict. - Signing certificate. Entra signs with the application's active SAML certificate. With
metadata_url, the platform refetches the metadata at sign-in once it is stale (at least every 24 hours), so add a new certificate a day before making it active.
Schema
Required
name(String) Display name, shown on the sign-in page.
Optional
default_role(String) Tenant role given to someone no group mapping matches:memberoradmin. Defaultmember.directory_id_attribute(String) SAML attribute holding a directory id (for exampleemployeeID) that matches the id of people imported into ContinueOps. Null: match on email only. Entra ID names claims with URIs:http://schemas.microsoft.com/identity/claims/objectidentifieris sent by default; an employee id needs a custom claim, for examplehttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/employeeid.email_attribute(String) SAML attribute holding the person's email address. Defaultemail. Matched case-insensitively against the attribute's Name or FriendlyName. When it isn't in the assertion, the well-known email attributes (including Entra ID'shttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress) and an email-format NameID are tried.groups_attribute(String) SAML attribute holding the person's groups (for examplegroups), one value per group. Needed for group mappings and group bindings. Null: groups are not read. For Entra ID usehttp://schemas.microsoft.com/ws/2008/06/identity/claims/groups; its values are group object ids unless the claim is configured otherwise. A person whose assertion has no groups (including Entra's over-150-groups case, which sendsgroups.linkinstead) getsdefault_roleand no group grants.metadata_url(String) URL of the IdP's SAML metadata, which the platform fetches. Exactly one ofmetadata_urlandmetadata_xml.metadata_xml(String) The IdP's SAML metadata document, typicallyfile("idp-metadata.xml"). Write-only: never returned by the API, null after import. Exactly one ofmetadata_urlandmetadata_xml.mfa_handled_by_idp(Boolean) When true, people signing in through this connection are not asked to enrol ContinueOps' own authenticator, because the identity provider already enforces MFA. This trusts the IdP's MFA, so only turn it on when it does. Defaultfalse.status(String)activeordisabled(nobody can sign in through it). Defaultactive.timeouts(Attributes) (see below for nested schema)
Read-Only
acs_url(String) Assertion consumer service URL (reply URL) to configure in the IdP.created_at(String) When the connection was created (RFC 3339, UTC).id(String) Connection id (UUID).idp_entity_id(String) The IdP entity id read from the metadata.provider_id(String) The platform's id for this SAML provider (appears insign_in_url).sign_in_url(String) Where people sign in through this connection.sp_entity_id(String) Service provider entity id (audience) to configure in the IdP.sp_metadata_url(String) URL of the service provider metadata, for IdPs that import it.updated_at(String) When the connection last changed (RFC 3339, UTC).
Nested Schema for timeouts
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).delete(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.read(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.update(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
Import is supported using the following syntax:
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
import {
to = continueops_sso_connection.example
id = "00000000-0000-4000-8000-000000000000"
}The terraform import command can be used, for example:
# Import by id (UUID). metadata_xml cannot be imported: the platform never returns
# it, so the next apply sends the configured metadata once.
terraform import continueops_sso_connection.example 00000000-0000-4000-8000-000000000000