List aad
Where Microsoft returns the user after sign-in.
GET /v1/provider/teams/link/aad
| Address | https://api.hanzo.ai/v1/provider/teams/link/aad |
| Method | GET |
| Operation | get_provider_teams_link_aad |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Where Microsoft returns the user after sign-in. It resolves the verified directory identity and then re-checks the tenant: the signed-in user's tenant must equal the tenant of the chat the link started from, so a valid Microsoft sign-in from a different organization is refused here rather than accepted.
This is the leg Teams has and the other platforms do not, which is why the Teams flow has an extra address.
This is one leg of a three-leg flow, and the legs are not interchangeable: a browser is expected to arrive here only from the leg before it. The link URL's state proves the prompt was server-minted and carries the CHAT it started from — it is provenance only, and it never decides which account gets linked. The account identity always comes from the platform's own verified sign-in and a host-bound cookie, so forwarding a link to someone else cannot bind their account, and a session lifted into another browser is refused rather than completed. Each link is single-use, and a deployment without linking configured answers 503.
Request
GET /v1/provider/teams/link/aad takes no parameters and no body — the credential is the whole request.
Response
The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.
Examples
hanzo provider teams link aadimport { Configuration, ProviderApi } from 'hanzoai';
const api = new ProviderApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProviderTeamsLinkAad();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ProviderApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ProviderApi(client).get_provider_teams_link_aad()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.ProviderAPI.GetProviderTeamsLinkAad(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, provider_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = provider_api::get_provider_teams_link_aad(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ProviderApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new ProviderApi(client).getProviderTeamsLinkAad();The method above is the one at the current release of the document. [email protected] (npm) was generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/provider/teams/link/aad \
-H "Authorization: Bearer $HANZO_API_KEY"MCP declares no tool for provider — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?