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

# Microsoft Foundry

> Connect a Microsoft Foundry agent to a StackOne A2A agent over the Agent2Agent protocol.

## Overview

StackOne A2A agents are standard [A2A](https://a2a-protocol.org/latest/) agents, so an agent built in [Microsoft Foundry](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/tools/agent-to-agent) (Azure AI Foundry Agent Service) can call a StackOne agent through Foundry's **A2A tool**. Your Foundry agent stays in control of the conversation and calls the StackOne agent to search and execute actions across your connected SaaS applications.

<Note>
  Microsoft Foundry's A2A tool is in public preview on Microsoft's side. StackOne agent cards work with it.
</Note>

## Connect StackOne in Foundry

In the [Foundry portal](https://ai.azure.com/), create a connection to the StackOne agent endpoint, then attach it to your agent:

1. Go to **Tools** and select **Connect tool**.
2. On the **Custom** tab, select **Agent2Agent (A2A)**, then **Create**.
3. Enter a **Name** and the StackOne **A2A Agent Endpoint**: `https://a2a.stackone.com`.
4. Under **Authentication**, add the two StackOne headers (see below).
5. Add the A2A tool to your agent, referencing the connection. Foundry reads the StackOne agent card, and your agent can then call it.

For the full setup, including the Python, C#, JavaScript, Java, and REST examples, see Microsoft's guide: [Connect to an A2A agent endpoint from Foundry Agent Service](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/tools/agent-to-agent).

## Authentication

A StackOne agent authenticates with two HTTP headers: your StackOne API key sent as HTTP Basic, plus your account ID.

* `Authorization: Basic <base64-encoded "<api_key>:">`
* `x-account-id: <account_id>`

Configure both as custom headers on the Foundry A2A connection, so Foundry sends them on the agent-card fetch and on every message. See [Authentication](/a2a/auth-security) for how to build the Basic token and find your account ID.

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="shield" href="/a2a/auth-security">
    Headers, accounts, and security
  </Card>

  <Card title="Gemini Enterprise" icon="google" href="/a2a/platform-guides/gemini-enterprise">
    Register StackOne agents in Gemini Enterprise
  </Card>
</CardGroup>
