> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bing Search

> Search the web from AI agents through Bing Grounding in Azure AI Foundry

<img src="https://mintcdn.com/prismeai/Oqq72tWGTtxufvRl/images/connectors/bing-search.svg?fit=max&auto=format&n=Oqq72tWGTtxufvRl&q=85&s=feb658a936c9acc1d9c27bdcc317e226" alt="Bing Search" width="96" height="96" noZoom style={{ float: "left", marginRight: "1.25rem", marginBottom: "0.5rem" }} data-path="images/connectors/bing-search.svg" />

The Bing Search connector exposes web search as a remote MCP server for AI agents. It uses **Bing Grounding** through **Azure AI Foundry** and returns sourced search results in the standard MCP `content` response format.

<CardGroup cols={3}>
  <Card title="Current Web Search" icon="magnifying-glass">
    Retrieve recent information from the web with source URLs
  </Card>

  <Card title="Azure Foundry" icon="cloud">
    Uses Azure AI Foundry Assistants with a configured Bing Grounding connection
  </Card>

  <Card title="MCP Native" icon="robot">
    Exposes a JSON-RPC MCP endpoint that Knowledges agents can call directly
  </Card>
</CardGroup>

## Prerequisites

* An **Azure subscription** with access to Azure AI Foundry
* An **Azure AI Foundry project** with a Bing Grounding connection
* An Azure AD application using the **client credentials** flow
* Workspace secrets for the Azure tenant, client ID, client secret, and token scope

<Note>
  This connector is designed for agent web-search scenarios and exposes the
  `bing_search` MCP tool.
</Note>

## Instance Configuration

The **Bing Web Search (Azure Foundry)** connector is available in your Prisme.ai instance. Before using it from an agent:

1. Open the connector configuration
2. Verify the Azure Foundry project settings in the connector configuration
3. Set the required Azure credentials in workspace secrets

## Azure App Registration

The connector authenticates to Azure AI Foundry with Microsoft Entra ID client credentials. You can create a dedicated app registration or reuse an existing service principal.

1. In Microsoft Entra ID, create an **App registration**
2. Copy the **Directory (tenant) ID** and **Application (client) ID**
3. Create a **client secret** in **Certificates & secrets**
4. Assign the service principal the **Azure AI User** role on the Azure AI Foundry resource or project used by the connector
5. Make sure the Azure AI Foundry project has access to the Bing Grounding connection configured below

<Note>
  Unlike Microsoft Graph connectors such as Outlook, SharePoint, or Excel, this
  connector does not require Graph API permissions or Graph admin consent. Access
  is controlled through Azure AI Foundry RBAC and the configured Bing Grounding
  connection.
</Note>

## Connector Configuration

Set these values in the connector configuration. They define which Azure Foundry project, model, and Bing Grounding connection the connector uses.

| Field                   | Description                                                                          |
| ----------------------- | ------------------------------------------------------------------------------------ |
| **Provider**            | `bing`                                                                               |
| **Foundry Base URL**    | Azure AI Foundry service URL, for example `https://<resource>.services.ai.azure.com` |
| **Foundry Project**     | Azure AI Foundry project name                                                        |
| **Foundry API Version** | Azure AI Foundry Assistants API version                                              |
| **Foundry Model**       | Model used by the temporary search assistant                                         |
| **Bing Connection ID**  | Full Azure resource ID of the Bing Grounding connection                              |

Default search options can also be configured:

| Field                 | Default | Description                                            |
| --------------------- | ------- | ------------------------------------------------------ |
| **Default Count**     | `5`     | Number of search results when `num_results` is omitted |
| **Default Market**    | `en-US` | Market code when `market` is omitted                   |
| **Default Freshness** | `Week`  | Recency filter when `freshness` is omitted             |
| **Token Cache TTL**   | `3300`  | Azure access token cache duration in seconds           |

## Workspace Secrets

Set these values in the workspace secrets panel. They are referenced by the connector configuration and are used to request Azure AD access tokens with the client credentials flow.

| Secret                | Description                                                                                      |
| --------------------- | ------------------------------------------------------------------------------------------------ |
| `AZURE_TENANT_ID`     | Azure AD directory tenant ID                                                                     |
| `AZURE_CLIENT_ID`     | Azure AD application client ID                                                                   |
| `AZURE_CLIENT_SECRET` | Azure AD application client secret                                                               |
| `AZURE_TOKEN_SCOPE`   | OAuth scope used when requesting the Azure access token, usually `https://ai.azure.com/.default` |

<Note>
  Keep Azure credentials in workspace secrets. Do not paste client secrets into
  the visible connector configuration fields.
</Note>

## MCP Setup

1. Open your **Knowledges project**
2. Go to **Advanced > Tools**
3. Click **Add** and select the **MCP** tab
4. Paste the MCP endpoint URL from the connector configuration
5. Save the tool and let the agent discover the `bing_search` tool

## Available Tool

| Tool          | Description                                                      |
| ------------- | ---------------------------------------------------------------- |
| `bing_search` | Search the web through Bing Grounding and return sourced results |

### Tool Arguments

| Argument      | Type   | Required | Description                                 |
| ------------- | ------ | -------- | ------------------------------------------- |
| `query`       | string | Yes      | Search query                                |
| `num_results` | number | No       | Number of results to request, from 1 to 10  |
| `market`      | string | No       | Market code, for example `en-US` or `fr-FR` |
| `freshness`   | string | No       | Recency filter: `Day`, `Week`, or `Month`   |

## MCP Examples

### Search with Defaults

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "bing_search",
    "arguments": {
      "query": "latest Azure AI Foundry Bing Grounding documentation"
    }
  }
}
```

### Search a French Market with Fresh Results

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "bing_search",
    "arguments": {
      "query": "actualites intelligence artificielle entreprise",
      "num_results": 5,
      "market": "fr-FR",
      "freshness": "Day"
    }
  }
}
```

## Response Format

Successful calls return an MCP tool result:

```json theme={null}
{
  "content": [
    {
      "type": "text",
      "text": "Search results with titles, URLs, snippets, and source annotations"
    }
  ],
  "isError": false
}
```

If the query is missing or Azure authentication fails, the connector returns `isError: true` with a text error message.

## Troubleshooting

**`Error: query parameter is required`** - The MCP call did not include `params.arguments.query`.

**`Authentication error`** - Check the Azure tenant ID, client ID, client secret, and token scope secrets in the connector workspace.

**`Failed to create assistant`** - Verify the Foundry base URL, project name, API version, model, and Bing Grounding connection ID.

**`Search did not complete`** - The Azure Foundry assistant run did not finish before the connector timeout. Retry with a narrower query or fewer requested results.

## Related

<CardGroup cols={2}>
  <Card title="Connectors Overview" icon="plug" href="/apps-store/marketplace/connectors">
    Compare App and MCP connector usage modes
  </Card>

  <Card title="Knowledges Tools" icon="robot" href="/products/ai-knowledge/connectors">
    Add MCP tools to an Knowledges agent
  </Card>
</CardGroup>
