Tutorial: Configure Slack for automatic user provisioning

The objective of this tutorial is to show you the steps you need to perform in Slack and Microsoft Entra ID to automatically provision and de-provision user accounts from Microsoft Entra ID to Slack. For important details on what this service does, how it works, and frequently asked questions, see Automate user provisioning and deprovisioning to SaaS applications with Microsoft Entra ID.

Capabilities supported

  • Create users in Slack
  • Remove users in Slack when they do not require access anymore
  • Keep user attributes synchronized between Microsoft Entra ID and Slack
  • Provision groups and group memberships in Slack
  • Single sign-on to Slack (recommended)

Prerequisites

The scenario outlined in this tutorial assumes that you already have the following items:

  • A Microsoft Entra tenant.
  • A user account in Microsoft Entra ID with permission to configure provisioning (for example, Application Administrator, Cloud Application administrator, Application Owner, or Global Administrator).
  • A Slack tenant with the Plus plan or better enabled.
  • A user account in Slack with Team Admin permissions.

Note

This integration is also available to use from Microsoft Entra US Government Cloud environment. You can find this application in the Microsoft Entra US Government Cloud Application Gallery and configure it in the same way as you do from public cloud.

Step 1: Plan your provisioning deployment

  1. Learn about how the provisioning service works.
  2. Determine who will be in scope for provisioning.
  3. Determine what data to map between Microsoft Entra ID and Slack.

Add Slack from the Microsoft Entra application gallery to start managing provisioning to Slack. If you have previously setup Slack for SSO, you can use the same application. However it is recommended that you create a separate app when testing out the integration initially. Learn more about adding an application from the gallery here.

Step 3: Define who will be in scope for provisioning

The Microsoft Entra provisioning service allows you to scope who will be provisioned based on assignment to the application and or based on attributes of the user / group. If you choose to scope who will be provisioned to your app based on assignment, you can use the following steps to assign users and groups to the application. If you choose to scope who will be provisioned based solely on attributes of the user or group, you can use a scoping filter as described here.

  • Start small. Test with a small set of users and groups before rolling out to everyone. When scope for provisioning is set to assigned users and groups, you can control this by assigning one or two users or groups to the app. When scope is set to all users and groups, you can specify an attribute based scoping filter.

  • If you need additional roles, you can update the application manifest to add new roles.

Step 4: Configure automatic user provisioning to Slack

This section guides you through connecting your Microsoft Entra ID to Slack's user account provisioning API, and configuring the provisioning service to create, update, and disable assigned user accounts in Slack based on user and group assignment in Microsoft Entra ID.

To configure automatic user account provisioning to Slack in Microsoft Entra ID:

  1. Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.

  2. Browse to Identity > Applications > Enterprise applications

    Enterprise applications blade

  3. In the applications list, select Slack.

    The Slack link in the Applications list

  4. Select the Provisioning tab.

    Screenshot of the Manage options with the Provisioning option called out.

  5. Set the Provisioning Mode to Automatic.

    Screenshot of the Provisioning Mode dropdown list with the Automatic option called out.

  6. Under the Admin Credentials section, click Authorize. This opens a Slack authorization dialog in a new browser window.

    Screenshot shows the Authorize Admin Credentials button.

  7. In the new window, sign into Slack using your Team Admin account. in the resulting authorization dialog, select the Slack team that you want to enable provisioning for, and then select Authorize. Once completed, return to the Azure portal to complete the provisioning configuration.

    Authorization Dialog

  8. Select Test Connection to ensure Microsoft Entra ID can connect to your Slack app. If the connection fails, ensure your Slack account has Team Admin permissions and try the "Authorize" step again.

  9. In the Notification Email field, enter the email address of a person or group who should receive the provisioning error notifications and select the Send an email notification when a failure occurs check box.

    Notification Email

  10. Select Save.

  11. Under the Mappings section, select Synchronize Microsoft Entra users to Slack.

  12. In the Attribute Mappings section, review the user attributes that will be synchronized from Microsoft Entra ID to Slack. Note that the attributes selected as Matching properties will be used to match the user accounts in Slack for update operations. Select the Save button to commit any changes.

Attribute Type
active Boolean
externalId String
displayName String
name.familyName String
name.givenName String
title String
emails[type eq "work"].value String
userName String
nickName String
addresses[type eq "untyped"].streetAddress String
addresses[type eq "untyped"].locality String
addresses[type eq "untyped"].region String
addresses[type eq "untyped"].postalCode String
addresses[type eq "untyped"].country String
phoneNumbers[type eq "mobile"].value String
phoneNumbers[type eq "work"].value String
roles[primary eq "True"].value String
locale String
name.honorificPrefix String
photos[type eq "photo"].value String
profileUrl String
timezone String
userType String
preferredLanguage String
urn:scim:schemas:extension:enterprise:1.0.department String
urn:scim:schemas:extension:enterprise:1.0.manager Reference
urn:scim:schemas:extension:enterprise:1.0.employeeNumber String
urn:scim:schemas:extension:enterprise:1.0.costCenter String
urn:scim:schemas:extension:enterprise:1.0.organization String
urn:scim:schemas:extension:enterprise:1.0.division String
  1. Under the Mappings section, select Synchronize Microsoft Entra groups to Slack.

  2. In the Attribute Mappings section, review the group attributes that will be synchronized from Microsoft Entra ID to Slack. Note that the attributes selected as Matching properties will be used to match the groups in Slack for update operations. Select the Save button to commit any changes.

    Attribute Type
    displayName String
    members Reference
  3. To configure scoping filters, refer to the following instructions provided in the Scoping filter tutorial.

  4. To enable the Microsoft Entra provisioning service for Slack, change the Provisioning Status to On in the Settings section

    Provisioning Status Toggled On

  5. Define the users and/or groups that you would like to provision to Slack by choosing the desired values in Scope in the Settings section.

    Provisioning Scope

  6. When you are ready to provision, click Save.

    Saving Provisioning Configuration

This operation starts the initial synchronization cycle of all users and groups defined in Scope in the Settings section. The initial cycle takes longer to perform than subsequent cycles, which occur approximately every 40 minutes as long as the Microsoft Entra provisioning service is running.

Step 5: Monitor your deployment

Once you've configured provisioning, use the following resources to monitor your deployment:

  1. Use the provisioning logs to determine which users have been provisioned successfully or unsuccessfully
  2. Check the progress bar to see the status of the provisioning cycle and how close it is to completion
  3. If the provisioning configuration seems to be in an unhealthy state, the application will go into quarantine. Learn more about quarantine states here.

Troubleshooting Tips

  • When configuring Slack's displayName attribute, be aware of the following behaviors:

    • Values are not entirely unique (e.g. 2 users can have the same display name)

    • Supports non-English characters, spaces, capitalization.

    • Allowed punctuation includes periods, underscores, hyphens, apostrophes, brackets (e.g. ( [ { } ] )), and separators (e.g. , / ;).

    • displayName property cannot have an '@' character. If an '@' is included, you may find a skipped event in the provisioning logs with the description "AttributeValidationFailed."

    • Only updates if these two settings are configured in Slack's workplace/organization - Profile syncing is enabled and Users cannot change their display name.

  • Slack's userName attribute has to be under 21 characters and have a unique value.

  • Slack only allows matching with the attributes userName and email.

  • Common error codes are documented in the official Slack documentation - https://api.slack.com/scim#errors

Change log

  • 06/16/2020 - Modified DisplayName attribute to only be updated during new user creation.

Additional Resources

Next steps