> 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="/files/XbCZEcMLK33DNEMSMrGA" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/0anoHyPmh59hIpgLhuEW" 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="/files/9PJqJxwlhVs706B6Kzzl" 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="/files/ZYzPChuYWEpK0lm5MYze" 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="/files/VX99yoOW8ijr7SICxMIa" 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="/files/okAWtjDMXpKK9TLXgLo0" 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="/files/TgBGVkQOtKGHDqmDxwKy" 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="/files/CTEWprSbNWUfFaN9YEpK" 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="/files/MkFxO7wIQv1dXhCfTSVm" 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="/files/GTPxf6ftgd0uCZJ5bcbJ" 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="/files/Z4UzQ69TUlaf0rwX1iEO" 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="/files/Fxxgzudgi6E4ZNHWZv2b" 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="/files/NBC9sTLn8vVadRldi0QD" 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="/files/J26ApRO3G4tL4T8cVrW0" 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="/files/J6CtOA5PabFpPiIFIlzs" 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="/files/mt8RDPXB7QTMnckIMhOP" 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="/files/MGOF9e84whiMZY96TkU5" 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="/files/Uuh2UxBApDlt2eOoscbe" 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:\
   \&#xNAN;**“Start recording user and admin activity.”**

<figure><img src="/files/c4vG7TDNNWiCCgsBLcfK" 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 %}
