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
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:
parent
51c94cd0cf
commit
6269d3302c
79 changed files with 1442 additions and 273 deletions
|
|
@ -84,10 +84,18 @@ class EntraLogin
|
|||
$overage = isset($claims['_claim_names']['groups']) || ($claims['hasgroups'] ?? false);
|
||||
|
||||
try {
|
||||
$me = $client->graph($token)->get('/me', ['$select' => EntraProfile::SELECT]);
|
||||
$me = $client->graph($token)->get('/me', ['$select' => EntraAttributes::select($provider)]);
|
||||
|
||||
// Einzelne Attribute brauchen weitere Berechtigungen (z. B. employeeHireDate) –
|
||||
// dann wenigstens die Grundangaben übernehmen.
|
||||
if ($me->clientError() && $me->status() !== 401) {
|
||||
Log::warning('Entra-Anmeldung: Zugeordnete Attribute nicht abrufbar ('.$me->status().'), nutze Grundangaben.');
|
||||
$me = $client->graph($token)->get('/me', ['$select' => implode(',', EntraAttributes::BASE_SELECT)]);
|
||||
}
|
||||
|
||||
$client->assertGraph($me);
|
||||
|
||||
$withManager = in_array('manager', $provider->syncedFields(), true);
|
||||
$withManager = $provider->syncsManager();
|
||||
$managerSubject = null;
|
||||
|
||||
if ($withManager) {
|
||||
|
|
@ -95,7 +103,7 @@ class EntraLogin
|
|||
$managerSubject = $manager->successful() ? $manager->json('id') : null;
|
||||
}
|
||||
|
||||
$profile = EntraProfile::fromGraph((array) $me->json(), $managerSubject, $withManager);
|
||||
$profile = EntraProfile::fromGraph($provider, (array) $me->json(), $managerSubject, $withManager);
|
||||
} catch (Throwable $e) {
|
||||
Log::warning('Entra-Anmeldung: Profil aus Graph nicht abrufbar, nutze ID-Token. '.$e->getMessage());
|
||||
$profile = EntraProfile::fromClaims($claims);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue