> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/de/features/settings/sso/entra-id.md).

# Active Directory (Microsoft Entra ID)

Diese Seite erklärt, wie Sie das SSO von Dastra mit Microsoft Entra ID (Active Directory) über das Protokoll SAML 2 einrichten.

## Die Anwendung in Microsoft Entra ID konfigurieren

* Öffnen Sie das Microsoft Entra Admin Center: <https://entra.microsoft.com>
* Klicken Sie in der linken Navigation auf **Entra ID** > **Enterprise apps**
* Klicken Sie auf **New application** und dann auf **Create your own application**
* Geben Sie den Namen der Anwendung ein, zum Beispiel „Dastra"
* Wählen Sie **Integrate any other application you don't find in the gallery (Non-gallery)** und erstellen Sie dann die Anwendung
* Klicken Sie im Abschnitt **Manage** auf **Single sign-on** und wählen Sie **SAML**
* Sie gelangen auf diese Seite:

<figure><img src="https://1094947073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgG4SiA7dB1sjSI91cItk%2Fuploads%2Fgit-blob-b11176d03102be64b1c7bd79178612246c877f29%2Fad1.png?alt=media" alt="Die SAML-Konfigurationsseite einer Enterprise-Anwendung in Microsoft Entra ID"><figcaption></figcaption></figure>

## Den SSO-Client in Dastra konfigurieren

### Schritt 1: Eine SAML-SSO-Anmeldung in Dastra erstellen

* Öffnen Sie die [Konfigurationsseite der Dastra-SSO-Anmeldungen](https://app.dastra.eu/general-settings/sso) (**Konfiguration der Organisation** > **Einmalige Anmeldung**)
* Klicken Sie auf **SSO-Login hinzufügen**
* Wählen Sie unter **Auswahl des SSO-Protokolls** den Eintrag **SAML2** und dann **Manuelle Konfiguration**
* Geben Sie unter **Bezeichnung der SSO-Anmeldung** eine Bezeichnung für die Verbindung ein, zum Beispiel „Active Directory"

### Schritt 2: Die SSO-Anmeldung in Microsoft Entra ID konfigurieren

* Gehen Sie zurück zur SAML-Konfigurationsseite von Microsoft Entra ID
* Klicken Sie im Abschnitt **Basic SAML Configuration** auf **Edit**
* Geben Sie die Verbindungsinformationen ein, die oben im SAML-Formular von Dastra angezeigt werden: **Identifier (Entity ID)** und **Reply URL (Assertion Consumer Service URL)**:

<figure><img src="https://1094947073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgG4SiA7dB1sjSI91cItk%2Fuploads%2Fgit-blob-e2621bdc51be1ceb2a1d7d946093a274163ae020%2Fad2.png?alt=media" alt="Der Abschnitt Basic SAML Configuration mit dem Identifier und der Reply URL"><figcaption></figcaption></figure>

* Klicken Sie auf **Save**
* Gehen Sie direkt zum Abschnitt **SAML Certificates**, um **das Zertifikat im Format Base64 herunterzuladen**:

<figure><img src="https://1094947073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgG4SiA7dB1sjSI91cItk%2Fuploads%2Fgit-blob-160008fb70247adc486bb1059a6ca2e918dd48fe%2Fad3.png?alt=media" alt="Der Abschnitt SAML Certificates mit dem Download-Link für das Base64-Zertifikat"><figcaption></figcaption></figure>

* Öffnen Sie die CER-Datei mit einem Texteditor (zum Beispiel Notepad) und kopieren Sie den Inhalt (Strg + C):

<figure><img src="https://1094947073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgG4SiA7dB1sjSI91cItk%2Fuploads%2Fgit-blob-37c1ca15c9ba91efe03b59d318309ceb0a2b18bc%2Fad4.png?alt=media" alt="Der Inhalt des Zertifikats, in einem Texteditor geöffnet"><figcaption></figcaption></figure>

### Schritt 3: Das Zertifikat zum Dastra-Client hinzufügen

* Gehen Sie zurück zum Bildschirm zur Erstellung der SAML-Verbindung in Dastra
* Fügen Sie den Text des Zertifikats (Strg + V) in das Feld **Identitätsanbieter-Zertifikat (RAW)** ein

### Schritt 4: Die URLs des Identitätsanbieters in Dastra konfigurieren

* Kopieren Sie im Abschnitt **Set up** der Entra-ID-Anwendung die drei Werte **Login URL**, **Microsoft Entra Identifier** und **Logout URL**:

<figure><img src="https://1094947073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgG4SiA7dB1sjSI91cItk%2Fuploads%2Fgit-blob-46cbe8b58247d802833740757a7dc34e847e43df%2Fad5.png?alt=media" alt="Der Abschnitt Set up der Anwendung mit den drei zu kopierenden URLs"><figcaption></figcaption></figure>

* Fügen Sie sie in Dastra gemäß dieser Zuordnung ein:
  * **Login URL**: **Identitätsanbieter (Identity Provider) Single Sign-On-URL**
  * **Microsoft Entra Identifier**: **Identitätsanbieter-Entitäts-ID (Aussteller)**
  * **Logout URL**: **Identity Provider Abmelde-URL**
* Ihr SSO-Konfigurationsformular in Dastra sollte so aussehen:

<figure><img src="https://1094947073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgG4SiA7dB1sjSI91cItk%2Fuploads%2Fgit-blob-b601c2bdaccb1a2b64044747d40d0b3dfc5b473c%2Fsettings-sso-entra-dastra-idp-configuration.png?alt=media" alt="Das SAML-Formular von Dastra, ausgefüllt mit den Werten von Microsoft Entra ID"><figcaption></figcaption></figure>

* Sie können die Option **Nutzer wird erstellt, wenn der Nutzer noch nie zu Dastra eingeladen wurde** im Abschnitt **Automatische Erstellung von Nutzern** aktivieren. In diesem Fall werden Konten Ihres Verzeichnisses, die in Dastra noch nicht existieren, bei der ersten Anmeldung erstellt:

<figure><img src="https://1094947073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgG4SiA7dB1sjSI91cItk%2Fuploads%2Fgit-blob-916dbd09f7a2ec53896ab4a83549b621e4c83042%2Fsettings-sso-entra-auto-create-user-option.png?alt=media" alt="Die Option zur automatischen Nutzererstellung im SSO-Formular"><figcaption></figcaption></figure>

* Speichern Sie Ihre Änderungen in Dastra

{% hint style="info" %}
Stellen Sie vor dem Test der Verbindung sicher, dass der neuen Anwendung ein Nutzer zugewiesen ist.
{% endhint %}

### Ihre SSO-Verbindung testen

Klicken Sie in Microsoft Entra ID im Abschnitt **Test single sign-on** der Anwendung auf die Schaltfläche **Test**. Wenn alles funktioniert, werden Sie zu Dastra weitergeleitet.

{% hint style="info" %}
Wenn Sie die automatische Nutzererstellung nicht aktiviert haben, verweigert Dastra den Zugriff, bis das lokale Konto durch eine Einladung erstellt wurde.
{% endhint %}

### Weiterführende Informationen

{% content-ref url="/pages/FdEIhMMUKJsnuZcFiWMS" %}
[Bekannte Probleme](https://doc.dastra.eu/de/features/settings/sso/known-problems.md)
{% endcontent-ref %}

{% content-ref url="/pages/FzTuK7VNYBVP7iZGTqHy" %}
[SAML 2](https://doc.dastra.eu/de/features/settings/sso/saml.md)
{% endcontent-ref %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.dastra.eu/de/features/settings/sso/entra-id.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
