Using Microsoft Graph API for sending email communications
To use the Microsoft Graph API for Legal Hold email communications, you need to register the Relativity
The Microsoft Graph API is an endpoint used to access data and services across Microsoft services. It is a RESTful web API that performs a variety of tasks. In this case, to send communications as a Microsoft user from Relativity.
Requirements
When leveraging the Graph API, you must use a Microsoft user email address and licensed mailbox. For more information, see Registering an Azure application and credentials.
Relativity Government users with a GCC High license can use the Graph API.
Considerations
When leveraging the Graph API, we recommend:
- Creating a legal hold-specific email address. For example, legalholds@companyxyz.com to send hold communications.
- Not using an individual user email address as legal hold notices will appear as if they are coming from that individual user.
This email requires an individual user license to authenticate with the Graph API. You cannot use emails from shared or group mailboxes because application permissions cannot be authenticated with those account types.
Registering an Azure application and credentials
To use the Microsoft Graph API, you need to register the Relativity
Start with registering your application in the Azure portal by following the steps below.
Note: These steps must be completed by a Microsoft 365 administrator.
- Open your Azure Portal.
- Click Microsoft Entra ID (formerly known as Azure Active Directory).
- Click App registrations.
- Click New Registration to display the Register an application page.
- Enter an application name in the Name field.
- Accept the default setting, Accounts in this organizational directory only, as the supported account type.
- Click Register.
- Once the application is registered, make note of the Application (client) ID and Directory (tenant) ID for use later when configuring the data source in RelativityOne Collect.
Adding permissions
Next, from the application's page, add permissions to the web API by following the steps below:
- Click API Permissions.
- Click Add a permission.
- Click Microsoft Graph.
- Select Delegated Permissions.
- Select the following options from the Delegated Permissions section:
- Mail – Mail.Send, Mail.ReadWrite
- User – User.Read
- Click Add Permission.
- Click Grant Admin Consent and then click Yes.
Configuring the redirect URL
In Azure Portal, navigate to the application's Overview page you are using for the integration. Follow the steps below.
- Using the left navigation column, click into the Authentication page.
- Click the Add a platform button.
- Click the Web drop-down text.
- Paste in your Redirect URL.Replace the bold part of the URL with your organization's subdomain, domain, and top-level domain.
Format:https://{RelativityURL}/Relativity.Rest/API/kCura.LegalHold.Services.ILegalHoldModule/Graph%20Authorization%20Manager/graph-auth-response >
Example:https://yourorganization.relativity.one/Relativity.Rest/API/kCura.LegalHold.Services.ILegalHoldModule/Graph%20Authorization%20Manager/graph-auth-response - Click the Configure button.
For more information on adding a redirect URL to Azure, see Microsoft’s documentation.
Creating a client secret
A client secret from Microsoft Azure AD is needed to integrate Microsoft and Relativity.
To create a client secret:
- In the left-navigation menu, click Certificates & secrets.
- Navigate to the Client secrets tab.
- Click the New Client Secret button.Note: Do not navigate away from the page once the client secret is created.
- Populate the Description and Expires fields. You can leave the default, or recommended, values.
- Click the Add button.
If the client secret was successfully created, you will see the Client Secret displayed on the table and the Value field should be displayed in plain text. - Copy the Value field and store it safely.
If you leave the page and comeback to get the value the Value field will be masked and you will not be able to copy it.
You can repeat steps 4-5 to generate a new client secret.
After you complete registering your app and have your client secret, you need to add this information to your email settings. For more information, see Adding email settings.
Authenticating with Microsoft
After registering the Relativity app in Microsoft, you must authenticate your application ID and password in Relativity, and your user email inbox. For example, legalholds@companyxyz.com. To authenticate with Microsoft, follow the steps below.
- Open your Relativity instance.
- Navigate to the Legal Hold Settings page.
- Enter the required email settings fields. For more information, see Fields and Adding email settings.Note: We recommend saving the required email settings information in a secure location.
- In the Settings console on the right side of the Legal Hold Settings page, click one of the Authenticate with Microsoft buttons.
Click Authenticate with Microsoft (Outgoing) if using the Graph API for outgoing emails or Authenticate with Microsoft (Incoming) if using the Graph API for incoming emails. For more information, see Testing the outgoing email settings or Testing your incoming email settings.
Clicking either of these buttons opens a Microsoft login screen. - Authenticate with the user you would like to send or receive communications through.
- Click Sign in.
Note: Once set up, if Graph API is not used within 90 days for sending emails, you must authenticate again in RelativityOne. Additionally, if the password for the account you authenticate with changes at any time, you must authenticate again in RelativityOne.
After signing in, Legal Hold displays a confirmation message telling you that the authentication is complete and that you can close the current tab. At this point, authentication with Microsoft is complete.
Fields
The fields you need to complete in Relativity to use the Graph API.
- Application Client ID—enter the Application Client ID created during registering the Legal Hold application in Microsoft 365.
- Application Client Secret—enter the Application Client Secret created during registering the Legal Hold application in Microsoft 365.
- Tenant ID/Domain—enter the Domain name of the Microsoft 365 tenant the collection is intended for.
- From Email Address—enter the email address you authenticated with Microsoft. Relativity will only use the email inbox that you authenticated with.
- Reply to Email Address—enter the email address you authenticated with Microsoft. Relativity will only use the email inbox that you authenticated with.
- Email Processor Type—select the Graph API in the drop-down menu.
- Enable Auto Refresh—enable to have Relativity automatically refresh the token if an email has not been sent for 70 days eliminating the need re-authenticate.Note: If disabled and the Graph API is not used for 90 days, then the refresh token will be invalidated.