> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/de/knowledge-base/how-to-articles/rename-entra-id-accounts-domain.md).

# Domäne von Entra ID-Konten umbenennen

Wenn Sie Remote Desktop Manager mit der Entra ID-Integration verwenden und Ihren Domänennamen und Tenant ändern, müssen Sie diese in Ihrer Datenbank ändern, damit sich Benutzer anmelden können.

Sie können das folgende SQL-Skript verwenden, um Ihre Benutzer auf die richtige Domäne umzubenennen.

{% hint style="success" %}
Stellen Sie zuerst sicher, dass Sie über eine Sicherung Ihrer SQL-Datenbank verfügen, da Sie Änderungen daran vornehmen müssen.
{% endhint %}

1. Verbinden Sie sich in SSMS mit Ihrem Azure Cloud-/On-Premises-SQL Server und erstellen Sie eine neue Abfrage. Stellen Sie sicher, dass sie gegen Ihre Remote Desktop Manager-Datenbank und **nicht** gegen Ihre Master-Datenbank ausgeführt wird.
2. Verwenden Sie das folgende Skript mit Ihren Informationen:

```
DECLARE @oldDomain as varchar(255) = '@oldDomain'
DECLARE @newDomain as varchar(255) = '@newDomain'

UPDATE UserSecurity
SET Name=replace(Name,@oldDomain,@newDomain),
    UPN=replace(UPN,@oldDomain,@newDomain),
    ExternalID = NULL
WHERE UserType = 0

UPDATE UserProfile
SET Name=replace(Name,@oldDomain,@newDomain)
```

Wenn Sie Ihren Azure-Tenant geändert haben, müssen Sie außerdem Folgendes tun:

1. Führen Sie `Select*FROM sys.sysusers` aus, um eine Liste aller Benutzer zu erhalten.
2. Löschen Sie jeden Benutzer und erstellen Sie ihn mit dem folgenden Skript neu:

```
DROP USER [user@domain.com];
CREATE USER [user@domain.com] FROM EXTERNAL PROVIDER;
```

3. Sobald die obigen Schritte abgeschlossen sind, müssen Sie möglicherweise den Cache "zurücksetzen", indem Sie Ihren Azure-Plan ändern und anschließend zum alten Plan zurückwechseln, damit sich Ihre Benutzer anmelden können.

Nach Abschluss der obigen Schritte enthält die SID die aktuellen Informationen, und Sie sollten sich mit den alten Benutzern authentifizieren können.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/rdm/de/knowledge-base/how-to-articles/rename-entra-id-accounts-domain.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
