The platform supports SAML 2.0 for Single Sign-On (SSO) and SCIM 2.0 for automatic user and team provisioning. Work with your Customer Success Manager to verify your SSO configuration before starting the training program.
This guide covers the following platform configuration areas:
Note: This configuration does not affect users who use password based authentication.Inform the user that you updated their profile and ask them to log in to the platform. The platform redirects the user to the SSO authentication page. After successful SSO authentication, the user can access the platform.
The platform supports SCIM 2.0 for automatic provisioning and deprovisioning of users and teams. Work with your Customer Success Manager to verify the SSO integration before configuring SCIM.

IMPORTANT:
Test the SCIM integration before deploying it to all accounts.
Create a small test group containing one or two accounts and provision only those accounts first. After your Customer Success Manager confirms that the integration works correctly, proceed with onboarding the remaining users.
If you are the integration engineer, request email confirmation from a Customer Success engineer before you provision a test group or begin onboarding users for the first time. Contact success@secureflag.com.
Provisioning a large group before the planned onboarding date may cause every account in that group to receive an invitation email early, which can affect the program.
When you remove a user from a group or application assignment in your identity management platform, such as Okta or Azure, the identity management platform automatically marks that user as inactive on the platform.
This is the default behaviour of the identity management system and cannot be modified or customised. Inactive users continue to count toward your active licence quota, and their data remains stored until you delete the users manually.
To permanently remove inactive users, follow the relevant Platform-specific SSO and SCIM guides below.
If your organization has more than one subscription, you can use the custom attribute sf_subscriptionId to control which subscription a user belongs to. The attribute is supported by both SAML and SCIM.
SAML: Send sf_subscriptionId as a claim in the SAML assertion. When a new user signs in for the first time, just-in-time (JIT) provisioning creates the user directly in the specified subscription. For existing users, the claim is evaluated at each sign-in, so you can use it to set or change the user's subscription.
SCIM: Send sf_subscriptionId as part of the user record during provisioning. The user is created in, or updated to, the specified subscription.If your Organization has more than one subscription, you can control which subscription a user is added to by setting the custom attribute sf_subscriptionId.
Go to Organizations → Details → Account & Subscriptions. Each subscription is listed with its ID.
Add sf_subscriptionId as a custom attribute in your identity provider and set each user's value to the ID of the subscription they should belong to. See the guide for your identity provider for the exact steps in the section below. If the attribute is not sent, the user is added to your default subscription.
SecureFlag supports parsing custom attributes for SAML and SCIM to configure user access, including role, team, managers, tags, and ThreatCanvas project permissions.
Important Considerations:
This is a list of all the custom attributes supported by the SecureFlag platform. Instructions on setup can be found in the Platform-Specific SSO and SCIM guides below.
Specifies which subscription to create the user in when the same Organization has multiple subscriptions that share the same SAML configuration. If omitted, the default subscription is used.
| Attribute | Type | Example |
sf_subscriptiondId | integer | 42 |
Specifies which organization to create the user in when multiple Organizations share the same SAML configuration. If omitted, the first matching organization is used.
| Attribute | Type | Example |
sf_org | integer | 42 |
Defines the user’s role on the SecureFlag platform.
| Attribute | Type | Example |
sf_role | integer | 3 |
The following roles are available:
| Integer | Role Name |
| 0 | Organization Admin |
| 3 | Team Manager |
| 4 | Stats |
| 5 | Creator |
| 6 | ThreatCanvas Reviewer |
| 7 | User |
Tip: Assign the role with the least privilege necessary. Setting sf_role also controls eligibility for sf_managed_teams (only valid for Team Manager and Organization Admin roles).Assigns the user to a team.
| Attribute | Type | Example |
sf_team | string (team name) | Blue Team |
Grants the user manager permissions over specific teams. Only applied if the user’s role is Team Manager or Organization Admin.
| Attribute | Type | Example |
sf_managed_teams | comma-separated list of strings | Blue Team, Red Team |
Specifies the email address of the user’s manager.
| Attribute | Type | Example |
sf_manager | string | manager@example.com |
Adds a list of tags to the user.
| Attribute | Type | Example |
sf_tags | comma-separated list of strings | Security, EMEA, Contractor |
Defines project permissions for ThreatCanvas.
| Attribute | Type | Example |
sf_projects | map | {"Project Alpha" : "RW", "Project Beta": "RO"} |
Permission Values:
RO = Read OnlyRW = Read/Write<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
<saml2:Issuer>https://idp.example.com/12345</saml2:Issuer>
<saml2:Subject>
<saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
jane.doe@example.com
</saml2:NameID>
</saml2:Subject>
<!-- First name -->
<saml2:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname">
<saml2:AttributeValue>Jane</saml2:AttributeValue>
</saml2:Attribute>
<!-- Last name -->
<saml2:Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname">
<saml2:AttributeValue>Doe</saml2:AttributeValue>
</saml2:Attribute>
<!-- Organization selector -->
<saml2:Attribute Name="sf_org">
<saml2:AttributeValue>42</saml2:AttributeValue>
</saml2:Attribute>
<!-- Subscription selector -->
<saml2:Attribute Name="sf_subscriptionId">
<saml2:AttributeValue>176</saml2:AttributeValue>
</saml2:Attribute>
<!-- Role -->
<saml2:Attribute Name="sf_role">
<saml2:AttributeValue>3</saml2:AttributeValue>
</saml2:Attribute>
<!-- Team Membership -->
<saml2:Attribute Name="sf_team">
<saml2:AttributeValue>Blue Team</saml2:AttributeValue>
</saml2:Attribute>
<!-- Managed Teams -->
<saml2:Attribute Name="sf_managed_teams">
<saml2:AttributeValue>Blue Team,Red Team</saml2:AttributeValue>
</saml2:Attribute>
<!-- Manager -->
<saml2:Attribute Name="sf_manager">
<saml2:AttributeValue>lead.manager@example.com</saml2:AttributeValue>
</saml2:Attribute>
<!-- Tags -->
<saml2:Attribute Name="sf_tags">
<saml2:AttributeValue>Security,EMEA,Contractor</saml2:AttributeValue>
</saml2:Attribute>
<!-- ThreatCanvas Projects -->
<saml2:Attribute Name="sf_projects">
<saml2:AttributeValue>{ "Project Alpha": "RW", "Project Beta": "RO" }</saml2:AttributeValue>
</saml2:Attribute>
</saml2:Assertion>
With JIT provisioning enabled, a user can automatically create an account in SecureFlag upon their first successful authentication. SecureFlag redirects the user to the organization’s Identity Provider (IdP), and after validating both the authentication and the user’s access rights, creates the account.
Note: Advanced User provisioning and lifecycle management can also be handled via SCIM. JIT Provisioning Use Cases:
To Enable JIT Provisioning:
Authorization Note: Ensure that users are assigned to the SecureFlag application in your IdP. Assignment can be done either directly to individual users or through group membership.Configuration Scenarios:
Configuration Scenarios:
SAML assertions must include first name and last name. SecureFlag recognizes several attribute names (case-insensitive):
| Property | Recognized Attribute Name |
| First Name | FirstName, firstName, givenName, user.givenname, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname |
| Last Name | LastName, lastName, sn, surname, user.surname, http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname |
| Organization Id (Required for setups involving multiple Organizations sharing the same SAML configuration) | sf_org |
| SubscriptionId (Required for Organizations having multiple Subscriptions) | sf_subscriptionId |
Single sign-on (SSO) and user provisioning are supported through SAML 2.0 and SCIM 2.0. The sections below include configuration steps for Microsoft Entra ID (formerly Azure AD), Okta, and OneLogin. To adapt these steps to your specific deployment, consult your identity provider's (IdP) documentation or administrator.
When enabling Single Sign-On (SSO), work with your organization’s Identity & Access Management engineer to ensure a smooth onboarding process before commencing the training program. This guide provides instructions for setting up Single Sign-On on Azure via SAML using the Create your own application functionality.
Note: If setting up multiple SecureFlag applications, speak with your Customer Success Manager; this requires an additional step.
Once you have the required Federation Metadata XML file from Azure, nefer to this article to set it up on the SecureFlag platform. For additional support please contact support at: https://www.secureflag.com/support.html
SecureFlag supports the SCIM 2.0 protocol for auto-provisioning and deprovisioning users and teams. Before implementing the SCIM configuration, work with your CSM to ensure the SSO integration's correctness.

IMPORTANT
SCIM integration must be tested before deployment to all accounts.
To test, create a small group of 1-2 accounts to be provisioned to SecureFlag. Once your Customer Success Manager confirms the integration, you may proceed to onboard the rest of the users.
If you are the Identity & Access Managmeent engineer, request an email confirmation from a SecureFlag customer success engineer before pushing a group for testing or onboarding for the first time. You can reach them at success@secureflag.com.
Pushing to a large group of users may result in all accounts within the group receiving an email invite before the onboarding date, which will affect the program.
Note: When a user is deactivated on Azure, the user's status is set to "Inactive" on SecureFlag. An inactive user still counts against the total number of active licenses, and their data is retained in the platform. To delete users, set up a workflow in Azure to issue a request to the SCIM's DELETE endpoint.When a user is removed from a group or app assignment, Azure marks them as “Inactive” in SecureFlag. If a user is deleted from the Directory, Azure first marks them as “Inactive” in SecureFlag and, after 30 days, automatically sends a delete request to remove them permanently. This is standard Azure behavior and cannot be customized or configured. Inactive users still count against your active license quota, and their data is retained unless deleted. To remove inactive users sooner, you can either:
If you need to only map a single custom attribute (e.g. sf_subscriptionId), prefer this solution.
Each subscription ID becomes an app role on the enterprise app. A group (or a single user) is assigned to the app with that role, and the role's value is sent as sf_subscriptionId in both the SAML token and the SCIM payload. One assignment drives both channels, so they always carry the same value.
Open Entra admin center → App registrations → click on the All applications tab.
Search for your SecureFlag app and click to open it.
Go to App roles → Create app role and fill in:
Display name: 12345 (the subscription ID)
Allowed member types: Users/Groups
Value: 12345 (the subscription ID)
Description: SecureFlag Unlimited 12345
Enable this app role: checked
Select Apply, then repeat for each subscription ID assigned to your Organization.
The claim reads the user's assigned role values, so no per-group configuration is needed here.
Go to Enterprise applications → SecureFlag → Single sign-on.
In the Attributes & Claims section, select Edit → Add new claim.
Fill in:
Name: sf_subscriptionId
Namespace: leave empty
Source: Attribute
Source attribute: user.assignedroles
Select Save.
3a. Add the attribute to the target schema
Go to Enterprise applications → SecureFlag → Provisioning → Attribute mapping.
Click on Advanced options, then select Edit customappsso user attributes
Add a row:
Name: urn:ietf:params:scim:schemas:core:2.0:User:sf_subscriptionId
Type: String
Leave all boxes unchecked
Select Save.
3b. Add the mapping
Back on the attribute mapping page, select Add Attribute Mapping.
Fill in:
Mapping type: Expression
Expression: SingleAppRoleAssignment([appRoleAssignments])
Target attribute: the attribute added in 3a (eg. sf_subscriptionId)
Apply this mapping: Always
Match objects using this attribute: Unchecked
Select OK, then Save on the mapping page.
Step 4: Create Groups (optional)
In Entra Admin center -> Groups -> click on Add Group
Fill in:
Group Type: Security
Group Name: SecureFlag Unlimited
Group Description: SecureFlag Unlimited Subscription
Membership Type: Assigned.
Create a Group for each subscription in your Organization
Assign members to each Group
The role chosen at assignment time is what sets sf_subscriptionId for everyone in that group.
Go to Enterprise applications → SecureFlag → Users and groups → Add user/group.
Under Users and groups, select the group (for example SecureFlag Unlimited).
Under Select a role, pick the matching role (SecureFlag Unlimited Subscription).
Select Assign, then repeat for each group.
Role changes are pushed on the next incremental cycle (roughly every 40 minutes).
Individual users: use the same screen, select a user instead of a group, and pick their role. A direct user assignment works exactly like a group assignment.
Nested groups are not supported for app assignment. Assign the groups that directly contain the users.
Use this path when you need two or more attributes (here sf_subscriptionId and sf_role). Every attribute is a directory extension on the user, and SAML and SCIM always read that user value. For a user-sourced attribute, admins set the value on the user directly. For a group-sourced attribute, investigate with your Azure engineer a scheduled script that copies the group's value onto its members.
Create one extension per attribute on the app registration of your SAML/SCIM app. This is a one-time setup.
The output lists the full names, such as extension_1a2b3c..._sf_role. Record them; every later step uses them.
Write one or more attributes onto a user in a single call. Only the attributes you pass are changed.
Go to Enterprise applications → SecureFlag → Single sign-on → Attributes & Claims → Edit → Add new claim.
Fill in:
Name: sf_subscriptionId
Source: Directory schema extension
Select the application you registered the extensions on, then pick sf_subscriptionId.
Select Save, then repeat for sf_role and any other attribute.
If a user has no value, Entra omits that claim from the assertion.
4a. Target schema
Go to Enterprise applications → SecureFlag → Provisioning → Attribute mapping.
Click on Advanced options, then select Edit customappsso user attributes
Add one String row per attribute, using the names and types server expects, for example:
urn:ietf:params:scim:schemas:core:2.0:User:sf_subscriptionId
urn:ietf:params:scim:schemas:core:2.0:User:sf_role
Select Save.
4b. Mappings (one per attribute)
Select Add New Mapping.
Fill in:
Mapping type: Direct
Source attribute: extension_<appIdNoDashes>_sf_subscriptionId
Target attribute: the matching row from 4a
Match objects using this attribute: No
Apply this mapping: Always
Select OK, repeat for sf_role, then Save.
When enabling Single Sign-On (SSO), work with your organization’s Identity and Access Management engineer to ensure a smooth onboarding process before commencing the training program. SecureFlag supports SAML 2.0 and SCIM 2.0 provisioning This guide provides instructions for setting up Single Sign-On on Okta using the SecureFlag App available on the Okta Marketplace.

Note: If you're setting up more than one SecureFlag application in your Okta account, contact your Customer Success Manager first, as an additional configuration step is required.
If your SecureFlag Organization has multiple subscriptions, add a custom SAML/SCIM attribute that specifies the subscription ID for each user.
SecureFlag supports the SCIM 2.0 protocol for provisioning and deprovisioning users and teams. Work with your CSM to ensure the SSO integration's correctness before diving into the SCIM configuration.

IMPORTANT
Before provisioning all accounts, test the SCIM integration with a small group of one or two users. Once your Customer Success Manager confirms the integration is working, you can onboard the rest of your users.
Integration engineers: Before pushing any group to SecureFlag for the first time, whether for testing or onboarding, get email confirmation from a SecureFlag Customer Success Engineer at success@secureflag.com. Pushing a large group too early can send email invitations to every user in that group before your planned onboarding date, which can disrupt your program rollout.
To provision users to the platform without adding them to SecureFlag Teams, assign them directly from the Assignments tab in the Okta app.
Teams on the platform are created from Okta groups, so if you don't want team details to sync, don't use Push Groups. If you already use Push Groups, follow the steps below to switch to an Assignments-based setup. Note: Unlinking groups using this procedure does not delete any users.
When a user is removed from a group, app assignment, or the Directory, Okta marks them as “Inactive” in SecureFlag. This is standard Okta behavior and cannot be customized or configured. Inactive users still count toward your active license total, and their data remains stored on the platform.
To permanently delete these users, you can either:
A prebuilt SecureFlag workflow for removing inactive users is available on the Okta Marketplace:
You can send custom attributes to SecureFlag over SAML, SCIM, or both. For SAML, Okta includes the attribute as a statement in the assertion sent at sign-in. For SCIM, Okta sends it in the provisioning request when a user is created or updated. For the list of supported attributes, see the Custom Attributes section.

1. Go to Applications & Resources → Applications → open the SecureFlag app → Sign On tab
2. Under SAML Settings click on Edit
3. Under Attribute Statements, add another row. You can reference the attribute created at the previous step with the prefix appuser. (e.g. appuser.sf_subscriptionId)
| Field | What to fill |
| Name | The custom attribute you want to send to SecureFlag, e.g. sf_subscriptionId |
| Name format | Unspecified |
| Value | appuser.sf_subscriptionId |
If a user belongs to more than one assigned group, Okta applies the profile from the group with the higher assignment priority. Set the order you want on the Assignments tab, and test a user who belongs to both groups before rolling this out.