Amazon Kendra is a highly accurate and easy-to-use intelligent search service powered by machine learning (ML). Amazon Kendra offers a set of data source connectors to simplify the process of ingesting and indexing your content, wherever it resides.
Valuable data in organizations is stored in structured and unstructured repositories. An enterprise search solution must be able to bring together data across multiple structured and unstructured repositories for indexing and searching.
One such unstructured data repository is Microsoft Exchange. Email conversations contain important messages exchanged between various parties over time. Users often attach documents that contain valuable information in the context of that email. In addition to email, an Exchange account provides access to other valuable sources of information, such as calendar entries, OneNote notebooks, and contacts.
We’re excited to announce that you can now use the Amazon Kendra Connector for Microsoft Exchange to search for information stored in your Exchange account. In this post, we show you how to index information stored on Exchange and use Amazon Kendra’s intelligent search feature. In addition, ML-powered intelligent search can accurately find information from unstructured documents that have natural language narrative content, for which keyword searching is not very effective.
Solution Overview
With Amazon Kendra, you can configure multiple data sources to provide a central place to search your document repository. For our solution, we demonstrate how to index an Exchange folder or repository using the Amazon Kendra connector for Exchange. The solution consists of the following steps:
- Set up an application on Exchange and get the connection details.
- Store the details in AWS Secrets Manager.
- Create an Exchange data source through the Amazon Kendra console.
- Index the data in the Exchange repository.
- Run a sample query to test the solution.
previous requirements
To test the Amazon Kendra connector for Exchange, you need the following:
Set up an Exchange app and collect connection details
Before configuring the Exchange data source, we need some details about your Exchange repository. Let’s get them together in advance.
- Login to the blue portal using your global admin user account and choose Next.
- Enter your password and choose Log in.
- On the Azure welcome page, choose application logs.
- Choose new record.
- Enter a name for the app (for example, my-exchange-app) and choose Record.
- Make a note of the Tenant ID (you will need this when you set up the data source for Amazon Kendra).
- Low client credentialschoose Add a certificate or secret.
- Choose new client secret.
- Enter a description (for example,
my exchange secret
). - Choose an expiration period (for this post, 6 months).
- Choose Add.
- Write down the secret ID and value to use later when configuring the data source.
- In the navigation pane, choose API permissions.
This is where you can add or remove admin permissions.
- For this post, leave the defaults as they are.
Store Exchange credentials in Secrets Manager
To store your Exchange credentials in Secrets Manager, complete the following steps:
- In the Secrets Manager console, choose keep a new secret.
- Select another kind of secret.
- Create two key-value pairs for
clientid
andclientsecret
and enter the saved values from Exchange. - Choose Next.
- For secret nameenter a name (for example,
AmazonKendra-my-exchange-secret
). - Enter an optional description.
- Choose Next.
- In it set rotation section, keep all settings at their default values and choose Next.
- About him Review page, choose Store.
Configuring the Amazon Kendra Connector for Exchange
To set up the Amazon Kendra connector, complete the following steps:
- In the Amazon Kendra console, choose create an index.
- For Index nameenter a name for the index (for example,
my-exchange-index
). - Enter an optional description.
- For role nameenter an IAM role name.
- Configure encryption settings and optional tags.
- Choose Next.
- For Specify provisioningselect Developer Edition and choose Next.
- In it Configure user access control section, leave the settings at their default values and choose Next.
- On the review page, select Create.
This creates and propagates the IAM role, and then creates the Amazon Kendra index, which can take up to 30 minutes.
Create an Exchange data source
Complete the following steps to create your data source:
- In the Amazon Kendra console, choose data sources in the navigation pane.
- Low microsoft exchangechoose add connector.
- For Data source nameenter a name (for example,
my-exchange-data-source
). - Enter an optional description.
- Choose Next.
- For tenant IDchoose the tenant ID you collected earlier.
- For AWS Secrets Manager secretchoose the secret you created earlier.
- For identity and access management functionchoose Create a new role.
- For role nameenter a name (for example,
AmazonKendra-myexchange-datasource-role
). - Choose Next.
- For user email id, you can enter a list of email IDs. To capture content from all users, leave the field blank.
We’ve kept the default selections, but you can adjust your content selection as needed.
- For synchronization modeselect full synchronization (this is the first time and we need to import all the content).
- For Frequencychoose run on demand.
- Choose Next.
- Set the optional field mappings and choose Next.
- Choose review and create and choose add data source.
- Choose sync now.
- Wait for the sync to complete.
try the solution
Now that you’ve ingested the contents of your Exchange account into your Amazon Kendra index, you can test a few queries.
- Go to your index and choose Search indexed content.
- Enter a sample search query and test your search results (your query will vary depending on the content in your account).
The Exchange connector also tracks local Exchange identity information. You can use this function to restrict your query by user.
- To use this feature, go back to the search results page.
- Expand Test query with username or groups and choose Apply username or groups.
For Microsoft Exchange, we don’t import groups, we only import usernames. Usernames are email IDs in this case.
- Enter the user ID (email) of your user and choose Apply.
- Rerun your search query.
This gives you a filtered set of results based on your criteria.
- Return to the search page and enter the name of a user who does not have access to this content, then choose Apply.
- Run the same query again.
When presenting Amazon Kendra with an app, such as an app built with Experience Builder, you can pass the user’s identity (in the form of an email ID) to Amazon Kendra to ensure that each user only sees content specific to their user ID. . Alternatively, you can use AWS IAM Identity Center (successor to AWS Single Sign-On) to control the user context that is passed to Amazon Kendra to limit queries per user.
Congratulations! You have successfully used Amazon Kendra to display responses and insights based on content indexed from your Exchange account.
limitations
This solution has the following limitations:
- Multiple domain emails are not supported.
- Sticky notes are not supported.
- Incremental updates are valid only for a specified period (7 days) before the client application needs to run a full sync again.
- Exchange Online has rate limits that govern the rate of ingestion. For more information, see Online trading limits.
Clean
To avoid incurring future costs, clean up the resources that you created as part of this solution. If you created a new Amazon Kendra index while trying this solution, delete it. If you just added a new data source using the Amazon Kendra Connector for Exchange, delete that data source.
Conclusion
With the Microsoft Exchange Connector for Amazon Kendra, organizations can access the repository of information stored in their account securely using intelligent search powered by Amazon Kendra.
To learn about these possibilities and more, see the Amazon Kendra Developer Guide. To learn more about how you can create, modify, or delete metadata and content when ingesting your Exchange data, see Enriching your documents during ingestion and Enriching your content and metadata to improve your search experience with custom document enrichment on Amazon. Kendra.
About the Author
ashish lagwankar He is a Senior Enterprise Solutions Architect at AWS. His main interests include container, AI/ML and serverless technologies. Ashish lives in the Boston, MA area and enjoys reading, being outdoors, and spending time with his family.