This section provides you information about how to configure MS Teams settings and also how to configure remote site settings. You need to gather client Id and client secret from the Azure portal to configure MS team setting in Contract Management.

Prerequisite

  • You must have MS teams and OneDrive or SharePoint license to integrate MS teams with Contract Management.
  • You can schedule the MSTeamsJobScheduler job to create an MS Teams channel according to your expected frequency.

To collect the Azure Client ID and Client Secret from the Azure portal

  1. Log in to the Azure portal as an Administrator.

  2. Select Azure Active Directory.

  3. Select App registrations.

  4. Select New registration and enter Apttus CLM Application.

  5. Click Register.

  6. From the left navigation, select Overview.
  7. Copy Application (Client) ID.
  8. From the left navigation, select Certificates & secrets.
  9. Click New client secret
  10. Add a description, select the validity duration, and select Add.
  11. Copy the value.
  12. On the left panel select API Permission.

  13. Click the Add Permission button.

  14. Provide the following permissions for Microsoft Graph API.

    TypePermission
    DelegatedFiles.ReadWrite
    DelegatedFiles.ReadWrite.All
    DelegatedGroup.Read.All
    ApplicationGroup.Read.All
    DelegatedGroup.ReadWrite.All
    ApplicationGroup.ReadWrite.All
    DelegatedSites.ReadWrite.All
    ApplicationSites.ReadWrite.All
    DelegatedUser.Read
    DelegatedUser.Read.All
    ApplicationUser.Read.All
    DelegatedDirectory.AccessAsUser.All
    ApplicationDirectory.ReadWrite.All
  15. On the Reporting API Application - API Permissions page, click Grant admin consent.

To configure MS teams setting in Contract Management

  1. Navigate to MS Teams Setting tab.

  2. Click New.

  3. Enter the following details to connect to the MS teams:
    1. Name: MS Teams

    2. MS Teams Login URL: Enter MS Teams login URL to connect to the service. 
      Sample value: https://login.microsoftonline.com/clmdev-eng.apttuscloud.io/oauth2/v2.0/

    3. MS Graph URL: Enter MS Teams graph URL to connect to the service. 
      Sample value: https://graph.microsoft.com/v1.0/

    4. Scope: Enter scope to be used in MS teams graph API.
      Sample value: https://graph.microsoft.com/.default

    5. Client Id: Enter the client Id. (Refer step 7 in the previous configuration)
      Sample value: 8m7r4**d-****-4c**-b4d8-e4a6b***79b

    6. Client Secret: Enter the client secret. (Refer step 11 in the previous configuration)
      Sample value: taiLWUY*****38&7B%400$5234c***UY%

    7. Show Client Secret: Select the checkbox to expose the Client Secret field value.

    8. Team Name Format: Enter a team name format to be used while creating a team in MS teams.
      Sample value: %Name% (Name of the Agreement)
    9. Channel Name Format: Enter a channel name format to be used while creating a channel in MS teams.
      Sample value: %Title% (Name of the document version detail)
    10. Active: Select the checkbox to activate the MS teams setting.
  4. Click Save.

Note

You can activate only one MS team setting at a time.

To configure remote settings in Contract Management

  1. Go to Setup > Security Controls > Remote Site Settings.
  2. Click New Remote Site.
  3. Enter a Remote Site Name and the Remote Site URL as https://login.microsoftonline.com for MS Teams Login.
  4. Select the Active checkbox.
  5. Click Save & New.
  6. Enter a Remote Site Name and the Remote Site URL as https://graph.microsoft.com for MS Graph URL.
  7. Select the Active checkbox.
  8. Click Save & New.
  9. Enter a Remote Site Name and the Remote Site URL for SharePoint URL.
    The SharePoint URL is specific to your domain and Microsoft license. 
  10. Select the Active checkbox.
  11. Click Save.

To schedule the MS Teams job via Schedule Apex

  1. Click Setup > Develop > Apex Classes > Schedule Apex.
  2. Enter the following information to configure the job parameters.

    1. Job Name: Enter a job name.

    2. Apex Class: Click the icon. Set search to MSTeamsJobScheduler and select MSTeamsJobScheduler. 

    3. Frequency: Select either Weekly or Monthly based on your requirement.

      • If you select Weekly, you need to specify one or more days of the week the job needs to run (such as Monday and Wednesday).
      • If you select Monthly, you need to specify either the date the job is to run or the day (such as the second Saturday of every month.)
    4. Start: Select the start date.
    5. End: Select the end date.
    6. Preferred Time: Select a preferred time for the dropdown.
  3. Click Save.

To schedule the MS Teams job via Developer Console

  1. Navigate to Developer Console. This displays the Developer Console window.
  2. Select Debug tab and select Open Execute Anonymous Window. This displays the Enter Apex Code window.
  3. Add the code in the following format:

    Apttus.MSTeamsJobScheduler c1 = new Apttus.MSTeamsJobScheduler();
    String sch1 = '0 5 * * * ?'; 
    System.schedule('MSTeamsJobScheduler - Schedule Job 5 mins', sch1, c1); 
    CODE