Using Selective Authentication per Subdomain in Office 365
Office 365 allows for various authentication mechanisms, which includes federated authentication...
One of the pieces of feedback we received from a previous ENow post (integrating your temporary COVID tenant with your on-premises environment), was the fear of introducing errors and interrupting processes that now rely on the Azure AD tenant. This, indeed, may be the case when you rely solely on Azure AD Connect’s soft matching capabilities and wield a narrow scope for synchronization of objects.
Let me explain.
When integrating an Azure AD tenant with an Active Directory environment, you’re bound to start with the situation where you have accounts on both sides that you need to combine. You encounter this situation when you’re integrating your COVID Azure AD tenant with your AD, but you might also find self-service accounts in Azure AD when performing a straightforward Hybrid Identity implementation.
As an admin, taking ownership of an Azure AD tenant means you’re going to actively manage and monitor the Azure AD tenant. This includes taking care of any objects you may or may not feel are in scope of your work. If you don’t, people may find themselves confronted with changed passwords, a different sign-in method suddenly pointing to the corporate federation solution, and/or lockouts.
The approach to combining the objects in both Active Directory and Azure AD consists of three steps:
Microsoft’s strong recommendation is to align the userPrincipalName attribute with the user object’s primary email address in Active Directory. This way, the on-premises userPrincipalName can be used in Azure AD.
In Active Directory, you can add additional userPrincipalName suffixes. This is the part in a user object’s sign-in name and email address after the ‘@’. Your organization may struggle with *.local Active Directory domain names or other DNS domain names that your organization doesn’t own or that aren’t registrable DNS domain names. In this case, you should add the DNS domain names your organization does own and use in its email addresses. Then, you should change the userPrincipalName attributes for all user objects in scope for synchronization to Azure AD to match their email addresses.
This is the point where things may break on-premises. Applications might have objects stored with the old suffixes in their databases, services may be programmed with hardcoded suffixes, etc. Luckily, you can test these changes with a small pilot audience and you can revert changes quickly.
The quintessential step to taking ownership of an Azure AD tenant is verifying the DNS domain names of your organization as Azure AD custom domain names in the Azure AD tenant.
No doubt, when you verify DNS domain names that resemble your email domains, you’ll face self-service accounts. These accounts have been created by people in your organization in the past when:
People have provided a password for these self-service accounts and have already setup multi-factor authentication to prevent getting locked out from their accounts when they forget these passwords. They use these passwords to access the functionality. These passwords may or may not be different from their passwords in Active Directory.
If your goal is to only synchronize a few objects from Active Directory to Azure AD, you should include the user accounts in Active Directory for people with Azure AD self-service accounts in the synchronization scope of Azure AD Connect. This way, you eliminate shadow IT and provide the benefits of single sign-on to these people.
During your project, their sign-in experience changes. When Azure AD Connect matches up these accounts to their on-premises accounts based on their email address, their sign-in method changes from cloud-only to:
In the first two cases, their passwords may change. In the third case, they get redirected to the federation sign-in experience when they access Azure AD and Azure AD-integrated applications, services and systems.
If the email address they registered their self-service account with doesn’t match the primary SMTP address for their Active Directory account, you should change one of these values. From my experience, changing the sign-in name in Azure AD is the way to go.
You should communicate the changes in sign-in name and sign-in method to them beforehand, together with a clear point in time for these changes. It goes without saying that I think you should automate and test these steps. From my experience, PowerShell suits this job well.
With the email addresses and userPrincipalName attributes aligning for your people, Azure AD Connect will automatically match any on-premises object in scope with the pre-existing Azure AD object through soft matching.
Through soft matching, an on-premises Active Directory user object is matched to an Azure AD user object, when:
There are scripts available that will check these matches and report on any mismatches. For mismatched objects, all is not lost. There’s also the ability to hard match.
Azure AD Connect and other synchronization solutions between Active Directory and Azure AD use the construct of a source anchor attributes. The source anchor is specified when Azure AD Connect is configured. This source anchor attribute acts as the end-to-end matching construct.
During normal operations, the source anchor object defaults to the mS-DS-ConsistencyGuid attribute for Active Directory objects. Upon initial synchronization of user objects and group objects by Azure AD Connect, the base64 representation of the objectGUID value is written to:
However, the mS-DS-ConsistencyGuid and ImmutableID attributes can be filled manually by entering the same value to the source anchor attributes of the objects in both directories.
This is hard matching. The userPrincipalName and primary email address attribute are ignored; soft matching does not occur. Azure AD Connect creates the match between the on-premises Active Directory object and the Azure AD object at the admin’s request.
The previously mentioned approach requires thinking before acting. The configuration of Azure AD Connect can be erroneous without verified DNS domain names without the proper userPrincipalName suffixes and without the right values for the userPrincipalName, proxyAddresses and mS-DS-ConsistencyGuid attributes.
In the last case, mismatches may occur. This may introduce improper access for unauthorized people and interruptions of critical processes like software asset management; an admin’s nightmare. Hard matching is the way to go when you foresee issues with soft matching.
Active Directory is the foundation of your network, and the structure that controls access to the most critical resources in your organization. The ENow Active Directory Monitoring and Reporting tool uncovers cracks in your Active Directory that can cause a security breach or poor end-user experience and enables you to quickly identify and remove users that have inappropriate access to privileged groups (Schema Admins, Domain Administrators). While ENow is not an auditing software, our reports reduce the amount of work required to cover HIPAA, SOX, and other compliance audits.
Access your FREE 14-day trial to accelerate your security awareness and simplify your compliance audits. Includes entire library of reports.
Sander's qualities extend beyond the typical triple-A stories in the area of Identity and Access Management. Of course, authentication, authorization and auditing are necessities but my out of the box solutions get the most out of software, hardware and the cloud. Rapid technological advancements have resulted in cutting-edge solutions around Active Directory, Azure Active Directory and Identity Management. Keeping up with these is just a small challenge, compared to my true goal: helping people use the technology on a daily basis. In a way that ICT is not a mere hurdle, but an infinite enabler. His work as a consultant, blogger and trainer are all means to achieve this goal. His multiple Microsoft Most Valuable Professional (MVP) status, Veeam Vanguard status and extensive certification aids him. Through direct communications with the product teams in Redmond, he remains up to date, exchange feedback and accelerate support.