Integrating with Slack

  • リリースバージョン: Australia
  • 更新日 2026年03月12日
  • 所要時間:23分
  • Integrating your Software Asset Management application with the Slack application enables you to track your software subscriptions and reclaim unused licenses.

    The ServiceNow Slack integration supports the Slack Enterprise Grid plan. This plan enables you to connect multiple workspaces across your organization.

    重要:
    Minimize security risks and protect information by granting access only to the necessary user or API permissions.
    Process Required user role in the Slack application Authentication scopes
    Download subscriptions Org Owner admin
    Pull user activity Org Owner admin
    Reclaim subscription Org Owner admin

    Create a Slack Enterprise Grid application

    Create a Slack Enterprise Grid application to manage and connect multiple workspaces across your organization.

    始める前に

    Role required: Refer to the Minimal user permissions table.

    手順

    1. From a web browser, open Slack.
    2. Sign in using your Slack credentials.
    3. Go to the Slack platform.
    4. On the page header of the Slack platform, select Your Apps.
    5. On the Your Apps page, select Create New App.
    6. Select From Scratch.
      The Name app and choose workspace dialog box opens.
    7. In the dialog box, enter an application name in the App Name field.
    8. From the Development Slack Workspace list, select the workspace that you want the application to belong to.
    9. Select Create App.
      The Slack platform creates the application and then redirects you to the Basic Information page. Use this page to view and configure application settings.
    10. On the Basic Information page, expand the App Credentials section and then copy the values in the Client ID and Client Secret fields.
      Save them in a secure location for later use.
    11. Expand the Add features and functionality section and then select Permissions.
    12. On the OAuth & Permissions page, configure the permissions that enable the interactions between the application and the Slack API.
      1. In the Redirect URLs section, add the URL of the OAuth provider that you want to redirect users to after authentication.
        1. Select Add New Redirect URL.
        2. When prompted, enter https://<instance-name>/oauth_redirect.do, where <instance-name> is the name of your ServiceNow instance.
        3. Select Add.
        4. Select Save URLs.
      2. In the User Token Scopes section, add the admin OAuth scope to the application.

        The OAuth scopes limit the level of access that the application has to your users, channels, and workspaces. For more information on Slack OAuth scopes, see OAuth Permission scopes.

        1. Select Add an OAuth Scope.
        2. When prompted, select admin from the OAuth Scope list.

          This OAuth scope enables the application to administer your workspace.

          注:
          The Description field for the OAuth scope populates automatically.
    13. Activate your application.
      1. From the left navigation pane, navigate to Settings > Manage Distribution.
      2. Under Share Your App with Other Workspaces, expand the Remove Hard Coded Information section.
      3. Verify that your application doesn’t contain any hard-coded information, such as OAuth tokens.
      4. After verification, select the I've reviewed and removed any hard-coded information check box.
      5. Verify that you have completed all other sections.
      6. Select Activate Public Distribution.

    Create a Slack workspace application

    Create a Slack application on each workspace that you want to track user activity on.

    始める前に

    Role required: Refer to the Minimal user permissions table.

    手順

    1. From a web browser, open Slack.
    2. Sign in using your Slack credentials.
    3. Go to the Slack platform.
    4. On the page header of the Slack platform, select Your Apps.
    5. On the Your Apps page, select Create New App.
    6. Select From Scratch.
      The Name app and choose workspace dialog box opens.
    7. In the dialog box, enter an application name in the App Name field.
    8. From the Development Slack Workspace list, select the workspace that you want the application to belong to.
    9. Select Create App.
      The Slack platform creates the application and then redirects you to the Basic Information page. Use this page to view and configure application settings.
    10. On the Basic Information page, expand the App Credentials section and then copy the values in the Client ID and Client Secret fields.
      Save them in a secure location for later use.
    11. Expand the Add features and functionality section and then select Permissions.
    12. On the OAuth & Permissions page, configure the permissions that enable interactions between the application and the Slack API.
      1. In the Redirect URLs section, add the URL of the OAuth provider that you want to redirect users to after authentication.
        1. Select Add New Redirect URL.
        2. When prompted, enter https://<instance-name>/oauth_redirect.do, where <instance-name> is the name of your ServiceNow instance.
        3. Select Add.
        4. Select Save URLs.
      2. In the User Token Scopes section, add the admin OAuth scope to the application.

        The OAuth scopes limit the level of access that the application has to your users, channels, and workspaces. For more information on Slack OAuth scopes, see OAuth Permission scopes.

        1. Select Add an OAuth Scope.
        2. When prompted, select admin from the OAuth Scope list.

          This OAuth scope enables the application to administer your workspace.

          注:
          The Description field for the OAuth scope populates automatically.
    13. In the OAuth Tokens & Redirect URLs section of the OAuth & Permissions page, select Install App to Workspace.
    14. Select Allow.
      Slack creates the application for the specified workspace.
    15. Repeat steps 4 through 13 for each workspace on which you want to create an application.

    Create a Slack integration profile

    Create a Slack integration profile to track software subscriptions and optimize licensing for your Slack applications.

    始める前に

    To create a Slack integration profile, request the Software Asset Management - SaaS License Management plugin (sn_sam_saas_int) from the ServiceNow Store.

    ServiceNow Role required: sam_integrator

    重要:
    You must select the Slack Spoke check box for this integration while installing optional features on the Application Manager page. For more information about choosing the required SaaS applications, see Request SaaS License Management.

    このタスクについて

    If you’re using Software Asset Workspace, the option to create the Slack integration profile in Core UI is inactive.

    手順

    1. Navigate to the integration profile.
      InterfaceAction
      Core UI
      1. Navigate to All > Software Asset > SaaS License > Direct Integration Profiles.
      2. Select New.
      3. Select Slack Enterprise Integration Profile.
      Software Asset Workspace
      1. Navigate to License operations > User Subscriptions > Direct integration profiles.
      2. Select New.
      3. Select Slack Enterprise from the drop-down list.
      4. Select Continue.
    2. On the form, fill in the fields.
      表 : 1. Integration Profile form
      Field Value
      Display Name Name of the integration profile. For example, Slack Integration.
      Status Status of the integration profile.
      • If you have not published the integration profile, this field is automatically set to Draft.
      • If you have already published the integration profile, this field is automatically set to Published.
      Profile Type Type of integration profile. This field is automatically set to Slack Enterprise Subscription.
    3. Review the required user roles or API permissions specified in the Vendor configuration field for each process to minimize security risks and optimize SaaS licenses.
      注:
      For more information, see Minimal user permissions table.
      1. In the Download Subscription Subflow section, verify that the Subflow field is set to Slack Download Subscriptions.
        注:
        The Download subscriptions check box is selected by default and you can't clear it.
      2. In the Calculate Activity Subflow section, verify that the Subflow field is set to Slack Update User Activity.
        注:
        The Download Activity check box is selected by default. If you clear it, the activity scheduled job SAM - Refresh <displayname> Activity isn't created.
        In the Analyze user activity field, you can also select the date and time starting from when you want to analyze the user activity. By default, you can analyze user activity up to 60 days prior to the current date and view events performed by individual users from the time you create this profile.
        注:
        Software Asset Management pulls the events from the time that you start analyzing user activity irrespective of the profile creation date.
        You can modify this value in the Last activity threshold field of your software reclamation rules. For more information, see Review a software reclamation rule.
      3. In the Reclaim Subscription Subflow section, verify that the Subflow field is set to Slack Reclaim Subscription.
        注:
        The Reclaim subscriptions check box is selected by default. If you don't want to reclaim subscriptions, you can clear this check box. If you clear it, the removal candidates are created but the reclaim subscription subflow isn't triggered or the reclamation process isn't initiated.
    4. Select Save.
      Your ServiceNow instance creates a draft integration profile.

      The Connection & Credential field appears and is automatically set to sn_slack_ah_v2.Slack_Enterprise.

    5. Open the connection & credential aliases record by selecting the preview icon (Preview icon.) next to the Connection & Credential field and then selecting Open Record in the record preview.
    6. On the Connection & Credential Aliases form, select the Create New Connection & Credential related link.
    7. In the Create Connection and Credential dialog box, fill in or verify the following fields.
      表 : 2. Create Connection and Credential dialog box
      Field Value
      Name Name of the Slack Enterprise Grid connection.
      OAuth Client ID Client ID that is assigned to your Slack Enterprise Grid application. Enter the same client ID that you copied in Create a Slack Enterprise Grid application.
      OAuth Client Secret Client secret that is assigned to your Slack Enterprise Grid application. Enter the same client secret that you copied in Create a Slack Enterprise Grid application.
      OAuth Redirect URL Redirect URL for your Slack Enterprise Grid application. This field populates automatically.
    8. Select Configure and Get OAuth Token.
      注:
      For the role required to perform this step, refer to the Minimal user permissions table.
    9. In the Authorize App dialog box, select Allow.
      The OAuth access token becomes available for authorizing your Slack Enterprise Grid connection.
    10. On the integration profile form, select Validate Connection to verify the connection and credential details of this integration.

      Validating the connection verifies the Download Subscriptions and Calculate Activity APIs, but not the Reclaim Subscriptions APIs.

      重要:
      If you encounter configuration issues while validating the integration profile or retrieving subscriptions, refer to the knowledge base for troubleshooting guidance. For more information, see knowledge base article KB2536373.
    11. After the connection is verified, select Publish.
    12. In the dialog box, select OK.
      注:
      If you clear the Download Activity check box after the integration profile is published, you must revalidate the connections and then republish the integration profile because the following events occur:
      • The Status field on the integration profile form changes to Draft.
      • The Validate connection button shows up on the form.
      • The current SAM - Refresh <displayname> Activity job gets deleted.
    13. オプション: To optimize memory and avoid performance issues in your Slack flow, you can turn off the flow engine reporting level.
      1. Navigate to System Properties > All Properties.
      2. Select the system property com.snc.process_flow.reporting.level.
      3. On the System Property page, set the Value to OFF.
      4. Select Update.

    次のタスク

    After the integration connects, your ServiceNow instance automatically creates software models, reclamation rules, and software subscriptions that are refreshed daily.

    After creating an integration profile, view information about the profile in the Software Asset Workspace by navigating to License operations > User subscription > Direct integration profiles. You can select an integration profile to view the following related lists. If all of the following related lists aren't visible for an integration profile in the default view, you can select the custom integration view from the Details tab:
    • Software Models
    • Unrecognized Subscription Identifiers
    • Scheduled Jobs
    • Scheduled Job Results
    • Software Subscriptions
    • Subscription Identifier Exclusion Rule
    • Subscription User Exclusion Rule

    After creating an integration profile, you can define subscription exclusion rules to keep certain subscriptions from license cost calculations. For more information, see Subscription exclusions for SaaS and SSO applications.

    If you want to set up multiple integration profiles for Slack workspace applications, create child aliases to manage different configurations and settings for each integration profile. For more information, see Create a child alias to set up multiple Slack workspace integration profiles.

    Review all automatically generated reclamation rules to reclaim user subscriptions. For more information, see Review a software reclamation rule.

    Create software entitlements for the automatically generated software models to track used software against owned software.
    Reconciliation also runs on your subscriptions as a scheduled job or on-demand. You can view your reconciliation results in the License Workbench (Software Asset Management classic application) or the License usage view (Software Asset Workspace). Use these results to determine your license compliance position and to remediate any non-compliance.