Beliebige Entra-Attribute ins Profil übernehmen; eigene Profilfelder
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m43s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m52s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m49s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m49s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 2m12s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 2m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 1m57s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 1m59s
CI / Build-Artefakte aktuell (pull_request) Successful in 57s

- Profilfelder frei definierbar (Typ, Sichtbarkeit, selbst pflegbar), Werte als JSON am Benutzer
- Attribut-Zuordnung je Anbieter statt fester Feldliste: jedes Graph-Attribut inkl.
  verschachtelter Pfade, onPremisesExtensionAttributes und Verzeichniserweiterungen
- Erweiterungsattribute per Knopf aus Entra laden
- $select dynamisch aus der Zuordnung; Delta-Abgleich startet bei geänderter Zuordnung neu
- Rückfall auf Grundattribute, wenn einzelne Attribute nicht lesbar sind
- Ältere Konfiguration (synced_fields) wird weiter gelesen

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-26 08:09:57 +00:00
parent 51c94cd0cf
commit 6269d3302c
79 changed files with 1442 additions and 273 deletions

View file

@ -97,4 +97,28 @@ class MappingTester
return collect((array) $response->json('value', []))->mapWithKeys(fn ($g) => [$g['id'] => $g['displayName'].' ('.substr($g['id'], 0, 8).'…)'])->all();
}
/**
* Verzeichniserweiterungen des Mandanten (extension_<appId>_<name>) für Benutzer –
* etwa aus Entra Connect synchronisierte AD-Attribute. Wird in der Konfiguration
* gespeichert und im Formular als Vorschlag angeboten.
*
* @return list<string>
*/
public function loadExtensionProperties(IdentityProvider $provider): array
{
$client = new EntraClient($provider);
$response = $client->graph($client->appToken())->post('/directoryObjects/getAvailableExtensionProperties', (object) []);
$client->assertGraph($response);
$names = collect((array) $response->json('value', []))
->filter(fn ($property) => in_array('User', (array) ($property['targetObjects'] ?? []), true))
->pluck('name')
->filter(fn ($name) => is_string($name) && preg_match(EntraAttributes::PATH_PATTERN, $name))
->unique()->sort()->values()->all();
$provider->update(['config' => array_merge((array) $provider->config, ['extension_properties' => $names])]);
return $names;
}
}