An Operator Behind the Agent: Entra ID Sign-Ins and Token Management

An Operator Behind the Agent: Entra ID Sign-Ins and Token Management

Exploring the integration of AI agents across cloud platforms with Microsoft Entra ID

As of November 30, 2026, there's an exciting development in the world of AI and cloud computing. A proof-of-concept system has been created that integrates AI agents across Microsoft's Azure and Google's Cloud platforms. This system uses Microsoft Entra ID for authentication and issues short-lived tokens to enhance security. Let's dive into what this means and how it works.

What is Entra ID?

Microsoft Entra ID is a service that allows users to sign in securely to applications and services. It issues access tokens that can be used to authenticate users. These tokens typically have a lifespan of 60 to 90 minutes. This means that once a user logs in, they can use this token to access services without needing to log in again for a while.

The Need for Short-Lived Tokens

In a world where cyber threats are prevalent, security is paramount. The longer a token is valid, the greater the risk of it being misused. By using short-lived tokens, the system limits the amount of time a token can be exploited if it falls into the wrong hands. In this proof-of-concept, the tokens are exchanged at the gateway for internal tokens that last a maximum of five minutes, which significantly reduces the risk of unauthorized access.

How Does the Token Exchange Work?

The gateway plays a crucial role in this system. It uses a process defined in RFC 8693, which is a standard for token exchange. Here's how it works:

Step 1: Operator Signs In

Operators, who are internal users (like those in a contact center), sign in using their Entra ID. This gives them an access token. The token includes information about the operator's identity and permissions.

Step 2: Token Exchange at the Gateway

When an operator wants to access services, their Entra token is sent to the gateway. The gateway checks the token's validity, ensuring it is not expired and that it was issued by a trusted authority. If valid, the gateway exchanges it for an internal token that has a much shorter lifespan (five minutes). This internal token is designed specifically for the services the operator is trying to access.

Step 3: Accessing Services

Once the internal token is issued, the operator can use it to access services securely. This token is scoped appropriately, meaning it only allows access to what the operator is permitted to do. For example, if the operator is allowed to read customer accounts, the internal token will reflect that permission.

The AI Agents

This proof-of-concept involves two AI agents:

  • Agent A: Operates on Azure within Microsoft Foundry.
  • Agent B: Runs on Google Cloud's Agent Runtime.

These agents communicate with each other and handle requests from both operators and customers. The token exchange mechanism ensures that they do so securely.

How Operators Interact with Agents

Operators can interact with the AI agents in two main ways:

Case 1: Acting for Themselves

In this scenario, the operator looks up customer information or asks questions that do not involve any customer data. The gateway exchanges the Entra token for an internal token that allows this action. For example, if an operator wants to look up a customer, the token would specify that they can perform this action without needing to name a specific customer.

Example:

Let's say an operator wants to check the status of a customer account. The request might look like this:

{
  "action": "accounts.lookup",
  "operator_id": "operator-12345"
}

Case 2: Serving a Customer

When an operator is on the line with a customer, they must name that customer when making a request. The gateway checks the operator's role to ensure they are allowed to serve customers, verifies the customer's account, and issues an internal token that includes the customer's information. This token will reflect the operator's permissions and the customer's identity, ensuring secure access to the necessary data.

Security Implications

The design of this system aims to enhance security by ensuring that tokens are tightly controlled and have limited lifetimes. By stopping the operator's Entra token at the gateway and issuing a new internal token, the system reduces the risk of token misuse. If an operator's account needs to be disabled, new tokens cannot be issued, and existing tokens will expire quickly.

How to Check and Fix Token Issues

If you are an operator or an administrator and you suspect there are issues with token access, here’s how you can check and fix them:

Step 1: Check Token Validity

To check if a token is valid, you can use the following command:

curl -X GET "https://api.example.com/check_token" -H "Authorization: Bearer YOUR_ENTRA_TOKEN"

This command sends a request to the API to verify the token. If the token is valid, you will receive a response indicating its status.

Step 2: Review Token Expiration

If the token is expired, you will need to re-authenticate. You can do this by signing in again through the Entra ID portal. Make sure to keep track of the expiration time to avoid disruptions.

Step 3: Fix Role Permissions

If you find that your token is valid but you still cannot access certain services, it may be due to insufficient permissions. Check your role assignments in the Entra ID portal. If necessary, request additional permissions from your administrator.

Step 4: Verify the Fix

After making any changes, verify that the token now allows the intended access. You can repeat the check from Step 1 to confirm that the token is functioning as expected.

Conclusion

This proof-of-concept system demonstrates a novel approach to managing authentication and tokenization across different cloud platforms. By integrating Microsoft Entra ID and employing short-lived tokens, it aims to enhance security and interoperability in AI agent communications.

Merits

  • Enhanced security through short-lived tokens.
  • Clear separation of customer and operator identities.
  • Controlled access to sensitive operations.

Demerits

  • This is still a proof-of-concept, not a production system.
  • Limited to specific use cases and environments.

Caution

This article is for educational purposes. Any placeholder values must be replaced with actual values in a real implementation. Always verify claims against the original source before relying on them.

Frequently asked questions

  • What is Microsoft Entra ID? — Microsoft Entra ID is a service that provides secure authentication for users accessing applications and services.
  • How does the token exchange work? — The token exchange process involves converting a long-lived Entra token into a short-lived internal token at the gateway.
  • What are the benefits of short-lived tokens? — Short-lived tokens reduce the risk of unauthorized access by limiting the time a token can be misused.
  • Who are the operators in this system? — Operators are internal users, such as contact center staff, who interact with AI agents.
  • What are Agent A and Agent B? — Agent A operates on Azure, while Agent B runs on Google Cloud, both serving as AI agents in this system.
  • Can operators perform sensitive operations? — No, the system is designed to prevent operators from executing sensitive operations like money transfers.

Tags

#cloud #security #AI

Free field guide

Prompt-Injection Defense Checklist

The controls that actually reduce the blast radius when your app feeds untrusted text to an LLM. Enter your email — you'll get the PDF instantly, plus new posts on AI, security & Linux.