> For the complete documentation index, see [llms.txt](https://docs.inogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inogic.com/sharepoint-knowledge-ai-search/prerequisite.md).

# Prerequisite

### Create an Azure AI Search Service in the Azure Portal

#### Navigate to Create Azure AI Resource

* Open your browser and go to the Azure portal: [https://portal.azure.com](https://portal.azure.com/)
* Sign in with your Azure account credentials
* In the upper-left corner of your dashboard, select Create a resource.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FVH86xeCUhrloPyZHfiF9%2FPicture1.png?alt=media&amp;token=7d48dbe6-c2b3-4cf2-9cf8-aa6b8e72bc0a" alt=""><figcaption></figcaption></figure>

#### Use the search box to find Azure AI Search

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FD8UjcFoXGqBzEimZp5L0%2FPicture2.png?alt=media&amp;token=c8dbf13b-6cb5-4b54-a835-232b6ad658a6" alt=""><figcaption></figcaption></figure>

#### Configure Basic Settings

When setting up the search service, you will be asked to provide the following details:

**Subscription:**

* Select the Azure subscription under which the search service will be created.
* If multiple subscriptions are available, choose the one you want to associate with this search service

#### Resource Group:

* Choose an existing resource group or create a new one.
* A resource group is a logical container that organizes related Azure resources.
* Use it to manage and consolidate resources for the same solution, monitor associated costs, and track the creation date of your search service.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FBsQO5bakXzdnbU3KJz1o%2FPicture3.png?alt=media&amp;token=05655791-a0c5-4098-98c3-e4572716c323" alt=""><figcaption></figcaption></figure>

#### Service name

Enter a unique name for your search service. This name becomes part of the service endpoint used for API calls, for example: <https://your-service-name.search.windows.net>

Example: If you enter myservice, the endpoint will be: <https://myservice.search.windows.net>

#### **Naming Guidelines for Azure AI Search Services in the Azure Portal**

i. The name must be unique within the search.windows.net namespace.\
ii. Use 2 to 60 characters.\
iii. Only lowercase letters, digits, and dashes (-) are allowed.\
iv. Do not use dashes as the first two characters or the last character.\
v. Avoid consecutive dashes.

**Region:** Choose the Azure region for your service. Ensure it supports the features required for your use case.

**Pricing tier:** Select the appropriate pricing tier (Free, Basic, or higher) based on your capacity and feature requirements. Each tier has its own [capacity and limits](https://learn.microsoft.com/en-us/azure/search/search-limits-quotas-capacity).

**Create your service:** After entering all required details, click Create to provision your search service.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FDpfGTK32psTTElKUNrq1%2FPicture4.png?alt=media&amp;token=e40323ff-869a-4d31-91b5-3d0af5e83a84" alt=""><figcaption></figcaption></figure>

### Create a Microsoft Entra application registration

The SharePoint Online index and Copilot Agent – InoWiz use a Microsoft Entra application for authentication. Ensure that this application is registered in the same tenant as Azure AI Search.

#### &#x20;Sign in and create the application:&#x20;

* Sign in to the [Azure portal](https://portal.azure.com/).
* Navigate to Microsoft Entra ID (or search for it), then select Add > App registrations.

&#x20;

<div data-with-frame="true"><figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FhVXFIS0CWQSxEtvH1YIN%2FPicture5-edited.png?alt=media&amp;token=e23fdf23-f3d2-4b21-81f7-ed8d700f5f3e" alt=""><figcaption></figcaption></figure></div>

* Select + New registration and provide the following:

&#x20;        **Name:** Enter a descriptive name for your app.\
&#x20;        **Supported account type:** Select Single tenant.\
&#x20;        **Redirect URI:** Skip this step; no URI is required.

* Click **Register** to create the application.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FNgHHgv5TN7zhjo82Z16U%2FPicture6.png?alt=media&amp;token=ac2d973e-9c1d-4cdc-bc33-310915651d4d" alt=""><figcaption></figcaption></figure>

#### Assign API Permissions

* In the app’s navigation pane, go to Manage > API permissions and select Add a permission.

<div data-with-frame="true"><figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FVDuNf9Vtj8o9RSrTQU2Z%2FPicture7.png?alt=media&amp;token=2bf0697a-e1de-4c93-b383-3038c70ed5ae" alt=""><figcaption></figcaption></figure></div>

Assign the following permissions:

**Microsoft Graph - Application Permission:**

&#x20;

* AuditActivity.Read
* Directory.ReadAll
* AuditLog.ReadAll
* Files.ReadAll
* Group.ReadAll
* Site.ReadAll
* User.ReadAll
* SharePointTenantSetting.ReadAll

&#x20;

**SharePoint - Application Permission:**

* AllSite.Read
* Site.ReadAll
* User.ReadAll

&#x20;

**SharePoint - Delegated Permission:**

&#x20;

* Site.SearchAll
* User.ReadAll

&#x20;

**Office 365 Management API - Application Permission:**

&#x20;

* ActivityFeed.Read
* ActivityFeed.ReadDlp
* ServiceHealth.Read

&#x20;

After adding the permissions, **grant admin consent** if required.

&#x20;

* Tenant admin consent is required for application API permissions.
* Some tenants may also require admin consent for delegated permissions.

<div data-with-frame="true"><figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FBvCPRCv7vJ9aGbngRW8r%2FPicture8.png?alt=media&amp;token=b0b5809e-49e1-4f94-80ef-472900a3c105" alt=""><figcaption></figcaption></figure></div>

### Create a Client Secret (for Application API Permissions)

To authenticate using application permissions, the Azure AI Search Index and InoWiz Agent require a client secret.

* In the app menu, go to Certificates & Secrets > Client secrets > New client secret.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F3mboDDcGpIvHnaYEnh7R%2FPicture9.png?alt=media&amp;token=f29b4a96-8a3f-4087-8102-b4f19853a5b8" alt=""><figcaption></figcaption></figure>

* Enter a description for the secret and adjust the expiration if necessary.

{% hint style="info" %}
**Note:** If the secret expires, you must recreate it and update the indexer.
{% endhint %}

&#x20;

<div data-with-frame="true"><figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FtiVkO8H93FHTn55D4ay1%2FPicture10.png?alt=media&amp;token=d283d23a-531a-4d75-966f-b6d051d5d388" alt=""><figcaption></figcaption></figure></div>

* After creating the secret, copy it immediately and store it securely. Once you leave the page, the secret will no longer be visible.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FBuPDFfp4NneL9yb14rSa%2Fimage.png?alt=media&amp;token=de626087-0590-4b85-bc11-c0523b6b571c" alt=""><figcaption></figcaption></figure>

### Create Data Source, Index, and Indexer in Azure AI Search

Once you have created the **Azure AI Search service**, the next step is to configure the **data source, index, and indexer.**

You can easily perform this setup using the **Postman collection** provided.

Simply enter the required input values while executing the collection.

Inside the **collection**, navigate to the **Variables tab**, where you can provide the necessary input details for the data being requested.

<div data-with-frame="true"><figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FiW7LVqOAqOhJXQS6Bqu6%2FPicture12.png?alt=media&amp;token=05b56f98-721a-4a26-a085-8c888c1e88d3" alt=""><figcaption></figcaption></figure></div>

Below is the table to find all the input data:

**i) AzureAISearchBaseURL:**

• Sign in to the **Azure Portal.**\
• Navigate to Azure **AI Search Service → Overview.**\
• Copy the URL listed here. This will be your **AzureAISearchBaseURL.**

<div data-with-frame="true"><figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FmGrxXhlwCDhEQrGhvB5x%2FPicture13-edited.png?alt=media&amp;token=7270a376-3f55-4811-a0c4-e51747d3cd1f" alt=""><figcaption></figcaption></figure></div>

**ii) AzureAISearchAPIKey:**

• In the Azure Portal, go to your Azure AI Search Service → Settings → Keys.\
• Copy either the Primary Key or Secondary Key. This will be your AzureAISearchAPIKey.

<div data-with-frame="true"><figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FAUSAMP7KCQOWoGVdcnqC%2FPicture14.png?alt=media&amp;token=487fd788-9fc9-4697-bb48-2ad43466e4e5" alt=""><figcaption></figcaption></figure></div>

**iii) AISearch-datasource-name:** Decide a **custom name** for your SharePoint data source.

**iv) Applicationid:**

* In the Azure Portal, go to **App Registrations → Your App → Overview.**
* Copy the **Application (Client) ID.** This will be your Applicationid.

&#x20;

<div data-with-frame="true"><figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FYRdhYwlo8obLKvsxbkcP%2FPicture15-edited.png?alt=media&amp;token=62bdf9d2-ee20-4574-a844-b53f9a07cf2a" alt=""><figcaption></figcaption></figure></div>

**v) Application-secret:**

* Go to **Azure Portal → App Registrations → Certificates & Secrets**.
* Create or copy the existing **Client Secret**.

<div data-with-frame="true"><figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F3xaBnuI7l8RwdOSHi35C%2FPicture16-edited.png?alt=media&amp;token=49ea7c22-ebc6-45ce-bf1d-19815756d870" alt=""><figcaption></figcaption></figure></div>

**vi) SharePoint-site-Url:**&#x20;

* Open your SharePoint Site in a web browser.
* **Copy the full Site URL.**

**vii) Tenantid:**

* In the Azure Portal, go to **App Registrations → Overview**.
* Copy the **Directory (Tenant) ID**.

&#x20;

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F7SrY9npdQ9DMuf0snRFd%2Fimage.png?alt=media&amp;token=72e4931e-aa20-4694-86e5-5dbd4224fa66" alt=""><figcaption></figcaption></figure>

**viii) Library-name:**

* Navigate to your SharePoint Site Library.
* Copy the Library URL.
* If you need a second library, repeat the same process.

&#x20;**ix) Library-name2:** If you need a second library, repeat the same process.

&#x20;**x). AISearch-Indexer-name:** Choose a **custom name** for your indexer.

{% hint style="info" %}
**Note:** Remember this name, you’ll need it later when running the indexer.
{% endhint %}

**xi). AISearch-Index-name:** Choose a **custom name** for your search index.

Note: Remember this name, you’ll need it later when running the indexer.

### Enable Audit Logs (Required for Copilot Agent)

&#x20;If you haven’t already enabled audit logs, the Copilot Agent will display the message:\
“Audit Log Not Enabled.”

To fix this:

1. Go to [admin.microsoft.com](https://admin.microsoft.com).
2. In the left panel, scroll down, select **“Show All”,** and then select **Microsoft Purview**.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FsniA5yreGnbxhw6gITn8%2Fimage.png?alt=media&amp;token=36e2a028-2dbb-4e48-81d4-4cbff7037d09" alt=""><figcaption></figcaption></figure>

3. In the Purview portal:

* Look for the **Audit solution.**
* If it isn’t on the homepage, click **View all solutions → Audit.**

4. On the Audit page, you will see a banner message:\
   **“Start recording user and admin activity.”**

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2Fal5BnbpClLZdPvCPg1pu%2Fimage.png?alt=media&amp;token=fbc250ce-8ba4-4278-b81e-befe7ab997d1" alt=""><figcaption></figcaption></figure>

5. Click on it to enable audit logging.

{% hint style="success" %}
For any queries, reach out to us at <crm@inogic.com>
{% endhint %}
