# US 2025/0028817 A1 · Securely brokering access tokens to partially trusted code

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0028817 A1
- Document ID: US20250028817A1
- Status: Published application
- Kind: A1
- Application number: 18/907,988
- Filed: 2024-10-07
- Published: 2025-01-23
- Earliest claimed: 2022-07-31
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Graham Lee MCMYNN; Patrick Carl MILLER; Luca BANDINELLI; John Giang NGUYEN
- Web page: https://patentgrep.com/patent/US20250028817A1

## CPC

- G06F 21/54: by adding security routines or objects to programs
- G06F 21/629: {to features or functions of an application}
- G06F 21/604: {Tools and structures for managing or administering access control systems}
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An access token broker is executed within a first iFrame, a fully trusted application is executed in a second iFrame within the first iFrame, and a partially trusted application is executed in a third iFrame within the second iFrame. The partially trusted application may identify the iFrame in which the access token broker is executing and request an access token from the access token broker. The access token broker determines whether the request for the access token is to be granted. If the request is to be granted, the access token broker requests the access token from a hosting application. The hosting application obtains the requested access token from an access token server and provides the access token to the access token broker. The access token broker receives the access token from the hosting application and provides the access token to the partially trusted application.

## Claims

### Claim 1

A computer-implemented method for securely managing an access token during execution of a hosting application that utilizes both a fully trusted application associated with a first origin and a partially trusted application that is embedded in the fully trusted application and that is associated with a second origin that is different than the first origin, comprising:
executing an access token broker configured to separately interact with the fully trusted application associated with the first origin and the partially trusted application associated with the second origin;
receiving, from the partially trusted application and at the access token broker, a request for the access token;
responsive to receiving the request for the access token, determining, by way of the access token broker, that a third origin associated with the access token is different than the second origin associated with the partially trusted application; and
denying the request for the access token based on the determining that the third origin associated with the access token is different than the second origin associated with the partially trusted application.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving, from the fully trusted application and at the access token broker, another request for another access token;
responsive to receiving the other request for the other access token, determining, by way of the access token broker, that a fourth origin associated with the other access token is the same as the first origin associated with the fully trusted application; and
granting the other request for the other access token based on the determining that the fourth origin associated with the other access token is the same as the first origin associated with the fully trusted application.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, further comprising:
requesting, by the access token broker, the other access token from the hosting application;
receiving, by way of the access token broker, the other access token from the hosting application; and
providing the other access token to the fully trusted application.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the partially trusted application is configured to identify the access token broker by transmitting a broker identification message.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein the broker identification message is transmitted via a postMessage method.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein:
the access token broker is executed in a first iFrame;
the fully trusted application is executed in a second iFrame embedded in the first iFrame; and
the partially trusted application is executed in a third iFrame embedded in the second iFrame.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein:
the access token broker and the fully trusted application are executed in a first iFrame; and
the partially trusted application is executed in a second iFrame embedded in the first iFrame.

### Claim 8

A computer-implemented method for securely managing an access token during execution of a hosting application that utilizes both a fully trusted application associated with a first origin and a partially trusted application that is embedded in the fully trusted application and that is associated with a second origin that is different than the first origin, comprising:
executing an access token broker configured to separately interact with the fully trusted application associated with the first origin and the partially trusted application associated with a second origin;
receiving, from the fully trusted application and at the access token broker, a request for an access token;
responsive to receiving the request for the access token, determining, by way of the access token broker, that a third origin associated with the access token is the same as the first origin associated with the fully trusted application; and
granting the other request for the other access token based on the determining that the fourth origin associated with the other access token is the same as the first origin associated with the fully trusted application.

### Claim 9 (depends on 8)

The computer-implemented method of claim 8, further comprising:
requesting, by the access token broker, the access token from the hosting application;
receiving, by way of the access token broker, the access token from the hosting application; and
providing the access token to the fully trusted application.

### Claim 10 (depends on 8)

The computer-implemented method of claim 8, wherein the fully trusted application is configured to identify the access token broker by transmitting a broker identification message.

### Claim 11 (depends on 10)

The computer-implemented method of claim 10, wherein the broker identification message is transmitted via a postMessage method.

### Claim 12 (depends on 8)

The computer-implemented method of claim 8, further comprising:
receiving, from the partially trusted application and at the access token broker, another request for another access token;
responsive to receiving the other request for the other access token, determining, by way of the access token broker, that a fourth origin associated with the other access token is different than the second origin associated with the partially trusted application; and
denying the other request for the other access token based on the determining that the fourth origin associated with the other access token is different than the second origin associated with the partially trusted application.

### Claim 13 (depends on 8)

The computer-implemented method of claim 8, wherein:
the access token broker is executed in a first iFrame;
the fully trusted application is executed in a second iFrame embedded in the first iFrame; and
the partially trusted application is executed in a third iFrame embedded in the second iFrame.

### Claim 14 (depends on 8)

The computer-implemented method of claim 8, wherein:
the access token broker and the fully trusted application are executed in a first iFrame; and
the partially trusted application is executed in a second iFrame embedded in the first iFrame.

### Claim 15

A computing device for securely managing an access token during execution of a hosting application that utilizes both a fully trusted application associated with a first origin and a partially trusted application that is embedded in the fully trusted application and that is associated with a second origin that is different than the first origin, comprising:
at least one processor; and
a computer-readable storage medium having computer-executable instructions stored thereupon which, when executed by the at least one processor, cause the computing device to perform operations comprising:
executing an access token broker configured to separately interact with the fully trusted application associated with the first origin and the partially trusted application associated with the second origin;
receiving, from the partially trusted application and at the access token broker, a request for the access token;
responsive to receiving the request for the access token, determining, by way of the access token broker, that a third origin associated with the access token is different than the second origin associated with the partially trusted application; and
denying the request for the access token based on the determining that the third origin associated with the access token is different than the second origin associated with the partially trusted application.

### Claim 16 (depends on 15)

The computing device of claim 15, wherein the operations further comprise:
receiving, from the fully trusted application and at the access token broker, another request for another access token;
responsive to receiving the other request for the other access token, determining, by way of the access token broker, that a fourth origin associated with the other access token is the same as the first origin associated with the fully trusted application; and
granting the other request for the other access token based on the determining that the fourth origin associated with the other access token is the same as the first origin associated with the fully trusted application.

### Claim 17 (depends on 16)

The computing device of claim 16, wherein the operations further comprise:
requesting, by the access token broker, the other access token from the hosting application;
receiving, by way of the access token broker, the other access token from the hosting application; and
providing the other access token to the fully trusted application.

### Claim 18 (depends on 15)

The computing device of claim 15, wherein:
the partially trusted application is configured to identify the access token broker by transmitting a broker identification message; and
the broker identification message is transmitted via a postMessage method.

### Claim 19 (depends on 15)

The computing device of claim 15, wherein:
the access token broker is executed in a first iFrame;
the fully trusted application is executed in a second iFrame embedded in the first iFrame; and
the partially trusted application is executed in a third iFrame embedded in the second iFrame.

### Claim 20 (depends on 15)

The computing device of claim 15, wherein:
the access token broker and the fully trusted application are executed in a first iFrame; and
the partially trusted application is executed in a second iFrame embedded in the first iFrame.
