|
| 1 | +# Grounding with Bing Search — Quick Setup |
| 2 | + |
| 3 | +This guide shows how to **create a Grounding with Bing Search resource** and **connect it to your Azure AI Foundry project through the portal**. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +* An **Azure subscription** |
| 10 | +* **Azure CLI** installed and logged in (`az login`) |
| 11 | +* A **resource group** already created |
| 12 | +* Register the Bing provider: |
| 13 | + |
| 14 | + ```bash |
| 15 | + az provider register --namespace Microsoft.Bing |
| 16 | + ``` |
| 17 | + |
| 18 | +⚠️ **Important:** |
| 19 | +Bing Search grounding only works with **API key authentication**. |
| 20 | +Make sure your **Azure AI Foundry account has Local Authentication enabled**. |
| 21 | +If local auth is disabled, you will not be able to create a Bing Search connection. |
| 22 | + |
| 23 | + |
| 24 | +## 1) Create the Bing Search Grounding resource |
| 25 | + |
| 26 | +### Option A — Using Azure Portal |
| 27 | + |
| 28 | +1. In the [Azure Portal](https://portal.azure.com), search for **Bing Search (Grounding)**. |
| 29 | +2. Click **Create**. |
| 30 | +3. Select the **Subscription** and **Resource Group**. |
| 31 | +4. Enter the **Resource Name** and select a **Pricing Tier (SKU)**. |
| 32 | +5. ⚠️ At the bottom of the creation form, you will see a required checkbox: |
| 33 | + - You must enable: ✅ *“I confirm I have read and understood the notice above.”* |
| 34 | + - Without checking this, you cannot proceed. |
| 35 | +6. Click **Review + Create** → **Create**. |
| 36 | + |
| 37 | +### Option B — Using Azure CLI |
| 38 | + |
| 39 | +Set the variables (replace values with your own): |
| 40 | + |
| 41 | +```bash |
| 42 | +RESOURCE_GROUP="<your-resource-group>" |
| 43 | +ACCOUNT_NAME="<unique-bing-resource-name>" |
| 44 | +LOCATION="global" # must be 'global' |
| 45 | +SKU="G1" |
| 46 | +KIND="Bing.Grounding" |
| 47 | + |
| 48 | +SUBSCRIPTION_ID=$(az account show --query id --output tsv) |
| 49 | +RESOURCE_ID="/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/microsoft.bing/accounts/$ACCOUNT_NAME" |
| 50 | +``` |
| 51 | + |
| 52 | +Create the resource: |
| 53 | + |
| 54 | +```bash |
| 55 | +az rest --method put \ |
| 56 | + --url "https://management.azure.com$RESOURCE_ID?api-version=2020-06-10" \ |
| 57 | + --body '{ |
| 58 | + "location": "'$LOCATION'", |
| 59 | + "kind": "'$KIND'", |
| 60 | + "sku": { "name": "'$SKU'" }, |
| 61 | + "properties": {} |
| 62 | + }' |
| 63 | +``` |
| 64 | + |
| 65 | +Verify: |
| 66 | + |
| 67 | +```bash |
| 68 | +az resource show --ids "$RESOURCE_ID" --api-version 2020-06-10 -o table |
| 69 | +``` |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +## 2) Connect the Bing resource to your Azure AI Foundry project (Portal) |
| 74 | + |
| 75 | +1. Go to your **Azure AI Foundry project** in the portal. |
| 76 | +2. Open **Management center** → **Connected resources**. |
| 77 | +3. Click **+ Add connection**. |
| 78 | +4. Select **Grounding with Bing Search**. |
| 79 | +5. Choose the Bing resource you created and click **Create**. |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | +## 💡 Why Use Bing Search Grounding? |
| 84 | + |
| 85 | +* Provides **real-time information** to enrich AI responses. |
| 86 | +* Helps LLMs answer with **up-to-date knowledge** beyond training data. |
| 87 | +* Useful for scenarios like **news, research, or dynamic data queries**. |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## 📚 Additional Resources |
| 92 | + |
| 93 | +* [Use Bing Search grounding with Azure AI Foundry (official docs)](https://learn.microsoft.com/en-us/azure/ai-foundry/agents/how-to/tools/bing-code-samples?source=recommendations&pivots=portal) |
| 94 | + |
| 95 | +``` |
| 96 | +
|
| 97 | +--- |
0 commit comments