# 2025-02-26: OAuth Service - Legal Entity information in the auth token

## Overview

An optional `legalEntityId` query parameter has been introduced to the endpoint. This is the recommended way to store information about the selected legal entity in the system. Upon logging in, users should select a legal entity they want to act on behalf of. It invokes the refresh token endpoint with the chosen entity. If the value is provided in the request, the validation process ensures that the customer is assigned to the specified legal entity.

## Updated endpoints

| Endpoint                                                                                                                                                                                                              | Description                                                         |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [Refreshing a customer token](https://developer.emporix.io/api-references/api-guides/companies-and-customers/customer-management/api-reference/authentication-and-authorization#get-customer-tenant-refreshauthtoken) | The endpoint extended with an optional `legalEntityId` query param. |

## Known problems

There are no known problems.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/changelog/archive/changelog-2025/2025-02-26-oauth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
