# 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.
