Skip to content

Commit 4b40d4e

Browse files
authored
Merge pull request #1997 from Whats-A-MattR/azure2name_attributemap
Azure2Name Attribute Mapping for SAML Claims
2 parents dbf1d49 + 07b64f7 commit 4b40d4e

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

attributemap/entra2name.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
$attributemap = [
4+
/**
5+
* Renamed Attributes to match other 2name mappings
6+
*/
7+
"http://schemas.microsoft.com/identity/claims/objectidentifier" => 'uid',
8+
"http://schemas.microsoft.com/identity/claims/displayname" => 'displayName',
9+
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" => 'givenName',
10+
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" => 'sn',
11+
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" => 'emailAddress',
12+
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" => 'mail',
13+
14+
/**
15+
* Additional/Optional Claim, using default value
16+
*/
17+
"http://schemas.microsoft.com/ws/2008/06/identity/claims/groups" => 'groups',
18+
19+
/**
20+
* Additional Attributes from Entra
21+
*/
22+
"http://schemas.microsoft.com/claims/authnmethodsreferences" => 'authNMethodsReferences',
23+
"http://schemas.microsoft.com/identity/claims/identityprovider" => 'idp',
24+
"http://schemas.microsoft.com/identity/claims/tenantid" => 'tenantId',
25+
];

attributemap/name2entra.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
$attributemap = [
4+
/**
5+
* Renamed Attributes to match other 2name mappings, mapped back to default Entra claim names
6+
*/
7+
'uid' => 'http://schemas.microsoft.com/identity/claims/objectidentifier',
8+
'displayName' => 'http://schemas.microsoft.com/identity/claims/displayname',
9+
'givenName' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname',
10+
'sn' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname',
11+
'emailAddress' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress',
12+
'mail' => 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name',
13+
14+
/**
15+
* Additional/Optional Claim, using default value, mapped back to original claim names
16+
*/
17+
'groups' => 'http://schemas.microsoft.com/ws/2008/06/identity/claims/groups',
18+
19+
/**
20+
* Additional Attributes from Entra, mapped back to original claims
21+
*/
22+
'authNMethodsReferences' => 'http://schemas.microsoft.com/claims/authnmethodsreferences',
23+
'idp' => 'http://schemas.microsoft.com/identity/claims/identityprovider',
24+
'tenantId' => 'http://schemas.microsoft.com/identity/claims/tenantid',
25+
];

0 commit comments

Comments
 (0)