Azure-Language-OpenAI-Conversational-Agent-Accelerator icon indicating copy to clipboard operation
Azure-Language-OpenAI-Conversational-Agent-Accelerator copied to clipboard

Tenant provided in token does not match resource token

Open jacol opened this issue 5 months ago • 1 comments

when deploying with azd up after several minutes I see error when starting Container instance:

Search setup complete Running agent setup... Traceback (most recent call last): File "/mnt/repo/infra/scripts/language/agent_setup.py", line 172, in triage_agent_definition = agents_client.create_agent( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 119, in wrapper_use_tracer return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/azure/ai/agents/_patch.py", line 322, in create_agent new_agent = super().create_agent( ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 119, in wrapper_use_tracer return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/azure/ai/agents/operations/_operations.py", line 5321, in create_agent raise HttpResponseError(response=response, model=error) azure.core.exceptions.HttpResponseError: (Tenant provided in token does not match resource token) Token tenant 33e01921-4d64-4f8c-a055-5bdaffd5e33d does not match resource tenant. Code: Tenant provided in token does not match resource token Message: Token tenant 33e01921-4d64-4f8c-a055-5bdaffd5e33d does not match resource tenant.

jacol avatar Sep 06 '25 21:09 jacol

Hi @jacol, could you verify two things:

  • In Azure AI Foundry portal, check if any agents were created in this project (project name should follow aif-<identifier>-agents).
  • When running azd auth login and az login, select the same account/subscription.

murraysean avatar Sep 25 '25 21:09 murraysean