microsoft.opentelemetry.a365.core.exporters.token_resolver_context module

Token resolver context types for contextual token resolution.

These types provide rich context to the token resolver delegate, including the agent identity (agent ID + agentic user ID) and tenant ID.

class microsoft.opentelemetry.a365.core.exporters.token_resolver_context.AgentIdentity(agent_id, agentic_user_id=None)[source]

Bases: object

Represents the identity of an agent and its acting user.

In the AI teammate scenario, agentic_user_id is 1:1 with agent_id. In the S2S scenario, agentic_user_id will be None.

property agent_id: str

The agent identifier.

property agentic_user_id: str | None

The agentic user identifier (AAD Object ID).

In the AI teammate scenario, this value is 1:1 with agent_id. Will be None in the S2S scenario.

class microsoft.opentelemetry.a365.core.exporters.token_resolver_context.TokenResolverContext(identity, tenant_id)[source]

Bases: object

Provides contextual information to the token resolver delegate.

identity provides first-class access to agent identity fields (agent ID, agentic user ID). tenant_id and identity together identify the cache key.

property identity: AgentIdentity

The agent identity associated with this token resolution request.

Contains the agent ID and agentic user ID (AAD Object ID) as first-class properties.

property tenant_id: str

The tenant identifier (part of the cache key).