Download PDF
Download page Configuring MS Teams Setting.
Configuring MS Teams Setting
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
Log in to the Azure portal as an Administrator.
Select Azure Active Directory.
Select App registrations.
Select New registration and enter Apttus CLM Application.
Click Register.
- From the left navigation, select Overview.
- Copy Application (Client) ID.
- From the left navigation, select Certificates & secrets.
- Click New client secret.
- Add a description, select the validity duration, and select Add.
- Copy the value.
On the left panel select API Permission.
Click the Add Permission button.
Provide the following permissions for Microsoft Graph API.
Type Permission Delegated Files.ReadWrite Delegated Files.ReadWrite.All Delegated Group.Read.All Application Group.Read.All Delegated Group.ReadWrite.All Application Group.ReadWrite.All Delegated Sites.ReadWrite.All Application Sites.ReadWrite.All Delegated User.Read Delegated User.Read.All Application User.Read.All Delegated Directory.AccessAsUser.All Application Directory.ReadWrite.All - On the Reporting API Application - API Permissions page, click Grant admin consent.
To configure MS teams setting in Contract Management
Navigate to MS Teams Setting tab.
Click New.
- Enter the following details to connect to the MS teams:
Name: MS Teams
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/MS Graph URL: Enter MS Teams graph URL to connect to the service.
Sample value: https://graph.microsoft.com/v1.0/Scope: Enter scope to be used in MS teams graph API.
Sample value: https://graph.microsoft.com/.defaultClient Id: Enter the client Id. (Refer step 7 in the previous configuration)
Sample value: 8m7r4**d-****-4c**-b4d8-e4a6b***79bClient Secret: Enter the client secret. (Refer step 11 in the previous configuration)
Sample value: taiLWUY*****38&7B%400$5234c***UY%Show Client Secret: Select the checkbox to expose the Client Secret field value.
- 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) - 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) - Active: Select the checkbox to activate the MS teams setting.
- Click Save.
Note
You can activate only one MS team setting at a time.
To configure remote settings in Contract Management
- Go to Setup > Security Controls > Remote Site Settings.
- Click New Remote Site.
- Enter a Remote Site Name and the Remote Site URL as https://login.microsoftonline.com for MS Teams Login.
- Select the Active checkbox.
- Click Save & New.
- Enter a Remote Site Name and the Remote Site URL as https://graph.microsoft.com for MS Graph URL.
- Select the Active checkbox.
- Click Save & New.
- Enter a Remote Site Name and the Remote Site URL for SharePoint URL.
The SharePoint URL is specific to your domain and Microsoft license. - Select the Active checkbox.
- Click Save.
To schedule the MS Teams job via Schedule Apex
- Click Setup > Develop > Apex Classes > Schedule Apex.
Enter the following information to configure the job parameters.
Job Name: Enter a job name.
Apex Class: Click the icon. Set search to MSTeamsJobScheduler and select MSTeamsJobScheduler.
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.)
- Start: Select the start date.
- End: Select the end date.
- Preferred Time: Select a preferred time for the dropdown.
Click Save.
To schedule the MS Teams job via Developer Console
- Navigate to Developer Console. This displays the Developer Console window.
- Select Debug tab and select Open Execute Anonymous Window. This displays the Enter Apex Code window.
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