microsoft / idfix

Microsoft IdFix
https://microsoft.github.io/idfix
MIT License
142 stars 84 forks source link

IdFix 2.6.0.2 Apostrophe in X500 from EXO #79

Open BohrenAn opened 2 years ago

BohrenAn commented 2 years ago

Category

Version

Please specify what version of IdFix you are using: [ 2.6.0.2 ]

Expected / Desired Behavior / Question

Would it make sense to ignore Apostrophe in X500 Addresses when it contains "/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients" ?

Observed Behavior

I have users with an Apostrophe in theyr Lastname like "d'Agostini". This will result in diffrent Attibutes containing that Apostrophe. Including the LegacyExchangeDN,CN,DN etc. When the user is synchronized to Exchange Online with AAD Connect. A Mailuser is created in Exchange online. The LegacyExchangeDN is then added as a X500 Address to the Proxyaddresses AD Attribute IdFix_X500

Steps to Reproduce

AD User with an Apostrophe in Lastname

ADUser from Active Directory

Get-ADUser Sandro.Dagostini -Properties * | fl AccountExpirationDate : accountExpires : 9223372036854775807 AccountLockoutTime : AccountNotDelegated : False AllowReversiblePasswordEncryption : False AuthenticationPolicy : {} AuthenticationPolicySilo : {} BadLogonCount : 0 badPasswordTime : 0 badPwdCount : 0 CannotChangePassword : False CanonicalName : corp.icewolf.ch/Icewolf Users/d'Agostini, Sandro Certificates : {} City : CN : d'Agostini, Sandro codePage : 0 Company : CompoundIdentitySupported : {} Country : countryCode : 0 Created : 16.02.2022 15:54:25 createTimeStamp : 16.02.2022 15:54:25 Deleted : Department : Description : DisplayName : d'Agostini, Sandro DistinguishedName : CN=d'Agostini\, Sandro,OU=Icewolf Users,DC=corp,DC=icewolf,DC=ch Division : DoesNotRequirePreAuth : False dSCorePropagationData : {09.06.2022 22:43:54, 09.06.2022 22:28:32, 09.06.2022 11:24:29, 09.06.2022 11:09:11...} EmailAddress : S.d'Agostini@icewolf.ch EmployeeID : EmployeeNumber : Enabled : True Fax : GivenName : Sandro HomeDirectory : HomedirRequired : False HomeDrive : homeMDB : CN=MDB02,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=corp,DC=icewolf,DC=ch HomePage : HomePhone : Initials : instanceType : 4 isDeleted : KerberosEncryptionType : {} LastBadPasswordAttempt : LastKnownParent : lastLogoff : 0 lastLogon : 0 LastLogonDate : legacyExchangeDN : /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=c4e80af3b3f645db976e9e625943cec4-d'Ago LockedOut : False logonCount : 0 LogonWorkstations : mail : S.d'Agostini@icewolf.ch mailNickname : Sandro.Dagostini Manager : mDBUseDefaults : True MemberOf : {CN=Group_4edf92dc-3616-425f-9406-baf7c0e9b53f,OU=GroupWriteback,OU=Icewolf Users,DC=corp,DC=icewolf,DC=ch} MNSLogonAccount : False MobilePhone : Modified : 09.06.2022 23:41:54 modifyTimeStamp : 09.06.2022 23:41:54 mS-DS-ConsistencyGuid : {75, 79, 139, 63...} msDS-ExternalDirectoryObjectId : User_8a3ec24e-336d-4066-bbdd-e99c3e888008 msDS-User-Account-Control-Computed : 8388608 msExchArchiveQuota : 104857600 msExchArchiveWarnQuota : 94371840 msExchCalendarLoggingQuota : 6291456 msExchDumpsterQuota : 31457280 msExchDumpsterWarningQuota : 20971520 msExchELCMailboxFlags : 130 msExchHomeServerName : /o=First Organization/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=ICESRV06 msExchMailboxGuid : {159, 238, 226, 72...} msExchMailboxSecurityDescriptor : System.DirectoryServices.ActiveDirectorySecurity msExchPoliciesIncluded : {81555ef0-da30-408c-b5d7-e1a1414666b5, {26491cfc-9e50-4857-861b-0cb8df22b5d7}} msExchRBACPolicyLink : CN=Default Role Assignment Policy,CN=Policies,CN=RBAC,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=corp,DC=icewolf,DC=ch msExchRecipientDisplayType : 1073741824 msExchRecipientTypeDetails : 1 msExchTextMessagingState : {302120705, 16842751} msExchUMDtmfMap : {emailAddress:7324678464, lastNameFirstName:324678464726376, firstNameLastName:726376324678464} msExchUserAccountControl : 0 msExchVersion : 88218628259840 msExchWhenMailboxCreated : 16.02.2022 15:55:42 Name : d'Agostini, Sandro nTSecurityDescriptor : System.DirectoryServices.ActiveDirectorySecurity ObjectCategory : CN=Person,CN=Schema,CN=Configuration,DC=corp,DC=icewolf,DC=ch ObjectClass : user ObjectGUID : 3f8b4f4b-8fd7-44a3-af93-fc5fde45e98d objectSid : S-1-5-21-2172137609-3848174251-3393784778-5210 Office : OfficePhone : Organization : OtherName : PasswordExpired : True PasswordLastSet : PasswordNeverExpires : False PasswordNotRequired : False POBox : PostalCode : PrimaryGroup : CN=Domain Users,CN=Users,DC=corp,DC=icewolf,DC=ch primaryGroupID : 513 PrincipalsAllowedToDelegateToAccount : {} ProfilePath : ProtectedFromAccidentalDeletion : False proxyAddresses : {x500:/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Reci pients/cn=47ca0ca35787401e84195e98a4569911-d'Agostini,, SMTP:s.dagostini@icewolf.ch, x500:/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=7a712724b27048fd927b7b8cec5ac3a0-d'Agos tini,, smtp:Sandro.Dagostini@icewolfch.mail.onmicrosoft.com} pwdLastSet : 0 SamAccountName : Sandro.Dagostini sAMAccountType : 805306368 ScriptPath : sDRightsEffective : 15 ServicePrincipalNames : {} showInAddressBook : {CN=All Users,CN=All Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=corp,DC=icewolf,DC=ch, CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=corp,DC=icewolf,DC=ch} SID : S-1-5-21-2172137609-3848174251-3393784778-5210 SIDHistory : {} SmartcardLogonRequired : False sn : d'Agostini State : StreetAddress : Surname : d'Agostini Title : TrustedForDelegation : False TrustedToAuthForDelegation : False UseDESKeyOnly : False userAccountControl : 512 userCertificate : {} UserPrincipalName : Sandro.Dagostini@icewolf.ch uSNChanged : 244100776 uSNCreated : 241687289 whenChanged : 09.06.2022 23:41:54 whenCreated : 16.02.2022 15:54:25

Query Mailuser Object in Exchange Online

Get-MailUser -Identity Sandro.Dagostini | fl legacy* LegacyExchangeDN : /o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=47ca0ca35787401e84195e98a4569911-d'Agostini,

Regards Andres

divadiow commented 1 year ago

I'm curious about this too.