Configuring Office 365 Preferred Language Settings


Office 365 empower organizations to use cloud based services for their business to ensure anytime anywhere access to corporate information. When you setup Office 365 tenant for an organization with offices in different regions then you’re also required to empower your end users to setup up their own preferred language settings in Office 365. For example, if you have a user in Japan then his preference will be to use Japanese language for his Office 365 portal instead of using English. In Office 365 you can set up language settings for users based on how you setup identities in Office 365. You can easily update language settings for users using PowerShell. Preferred language settings depends on how user identity is provisioned. If you have cloud based identities then you need to use Azure AD to modify the user account properties in Office 365. If you are using Azure AD Connect to sync on-premises active directory accounts with Office 365, then you have to update the settings in local active directory.

Configuring Office 365 Preferred Language Settings for Cloud Identities

Configuring Office 365 language settings for cloud based identities requires you to connect with Azure AD powershell. Perform the following steps to configure these settings.

  • Connect with Azure AD powershell using global admin credentials

C:\> Connect-MsolService

Configuring Office 365 Preferred Language Settings

  • Run the following cmdlet to configure the preferred language settings for user to Urdu

PS C:\> Set-MsolUser -UserPrincipalName -PreferredLanguage “ur-PK”

  • To verify the language settings for the user account, run the following PS cmdlet

PS C:\> Get-MsolUser -UserPrincipalName | fl PreferredLanguage

Configuring Office 365 Preferred Language Settings

Configuring Office 365 Preferred Language Settings for Synced Identities

When you are using synced identities with Office 365, you need to modify the on-premises user attribute in Active Directory to setup preferred language in Office 365. To modify the preferred language in Office 365 to Urdu for a user Phil, you need to set the “PreferredLanguage” attribute in user account properties in Active Directory. By default, this attribute does not contain any value and set to use English as default language.

  • To modify the individual user account properties, you can run the following PowerShell cmdlet.

Set-ADUser -Replace @{‘PreferredLanguage’=”ur-PK”}

  • To update the preferred language attribute in a specific OU, run the following cmdlet.

Get-ADUser SearchBase “OU=Test,OU=IT, DC=msexperttalk,DC=com” Filter * Properties PreferredLanguage | ForEach-Object {Set-ADUser $_.SAMAccountName –replace @{PreferredLanguage=“ur-PK”}}

  • To update the preferred language attribute of users in a specific domain, run the following cmdlet. Following cmdlet will set the attribute for those users who do not have any this attribute setup.

Set-AdServerSettings -RecipientViewRoot “”
#Change language to ur-PK for all users with a setting of NULL in the domain
Get-ADUser -SearchBase “DC=msexperttalk,DC=com” -Filter * -Properties PreferredLanguage | where {$_.PreferredLanguage -eq $null} | Select SAMAccountName | ForEach-Object {Set-ADUser $_.SAMAccountName –replace @{PreferredLanguage=”ur-PK”}}

Preferred Language attribute settings will update the language for the following in Office 365.

  • Office 365 Default Landing page
  • General settings and menu
  • Office 365 Management portal
  • Video
  • Groups
  • OneDrive for Business
  • Delve
  • Office Online
  • Planner

To review a complete list of available language codes, please visit the Microsoft TechNet site.

Configuring Azure AD Connect to use specific Domain Controller


Microsoft Azure AD Connect (AAD Connect) tool replicates your on-premises Active Directory with Office 365. Configuring Azure AD Connect to use specific domain controller can help expedite the process of replicating the changes to Office 365. I have seen scenario’s where on-premises Active Directory changes have not been replicated to Office 365 after 30minutes and Azure AD Connect shows a successful Delta Sync status in MIIS client. The fact why it happens is because Azure AD Connect is replicating the changes to Office 365 from a domain controller which doesn’t have your latest updates.

How Azure AD Connect locate a Domain Controller?

When you deploy Azure AD Connect tool in Active Directory forest, Azure AD Connect leverage DNS to locate a domain controller. Once Azure AD connect has a domain controller information, it connects with the same domain controller every time until the domain controller is not reachable and than Azure AD Connect tries to connect to another domain controller.

Why we need to Configure Azure AD Connect to use specific Domain Controller?

Configuring Azure AD Connect to use specific domain controller is required when you are implementing directory synchronization with Office 35 for multi-site active directory infrastructure where users are in multiple active directory sites across the globe.If you are modifying active directory changes and need to have them replicated to Office 365 quickly than we have 2 options, option 1 is to modify the changes to the domain controller from where Azure AD Connect is replicating the changes to Office 365. Downside of option 1 is that, you have to check the domain controller information from where the changes were being replicated during the last sync cycle. Option 2 is to configure the AAD Connect tool to use specific domain controllers. It’s much easy to configure the list of domain controllers in directory sync tool than to wait for replication changes to happen across active directory sites.

Configuring Azure AD Connect to use specific Domain Controller

Once the directory synchronization tool is installed. Follow the steps mentioned below to configure the list of domain controllers to which Azure AD Connect tool will connect.

  • Login to Azure AD Connect server and run the miis client

if you have installed the tool on default location, than Miis client can be located from C:\Program Files\Microsoft Azure AD Sync\UIShell

Configuring Azure AD Connect to use specific Domain Controller

  • Navigate to connectors and go to the properties of your connector

Configuring Azure AD Connect to use specific Domain Controller

  • In properties windows, select Configure Directory Partition and click on Configure to define your prefer domain controllers

Configuring Azure AD Connect to use specific Domain Controller

  • Enter the FQDN of your preferred domain controllers and click on Add

Configuring Azure AD Connect to use specific Domain Controller


  • Once you have defined the preferred domain controllers, make sure you have mark the checkbox next to Only use preferred Domain Controllers

Configuring Azure AD Connect to use specific Domain Controller

  • Click OK button to complete the configuration of preferred domain controller in Azure AD Connect tool

Azure AD connect tool is now configured to use preferred domain controllers only. Azure AD Connect will always check the preferred domain controllers for any modification in Active Directory to replicate with Office 365. More information on Azure AD Connect tool can be found here


Step by Step Azure AD Sync Installation Guide (Part 2)

In this article we will install and configure the Azure AD Sync tool to synchronize on prem identities with office 365. Part 1 of this article series revolves around the prerequisites required to install and configure Azure AD Sync tool. We’re already done with Azure AD Sync tool prerequisites and has created the required service account on Office 365 and on prem active directory.

Let’s get started with Part 2 of this series.

Azure AD Sync Installation

  • To install Azure AD Sync tool, login to Sync server using the on prem local active directory service account. In our case, local active directory service account name is
  • You can download the most recent version of Azure AD Sync using the following link of Microsoft Website.
  • If there are 100,000 or less objects in AD to sync to Office 365 you can use SQL express, If more objects are needed then a full version of SQL is required.
  • The minimum recommended hardware requirements for the synchronization server in relation to how many objects you have in your on-premises Active Directory can be found on Technet.

It’s recommended that you should use a separate machine for Azure AD Sync tool installation. Azure AD Sync tool should not be installed and configured on Domain Controller and ADFS server as it’s not recommended.

  • Let’s get started with the installation of Azure AD Sync tool. To start the installation process, launch the executable called MicrosoftAzureADConnectionTool.exe


  • Once you run the executable, Click YES on User Account Control pop up to start the process.

a (2)

  • Windows Azure AD Sync setup will being, specify the path to install the tool. In our case, we’re using the default installation path.

Step by Step Azure AD Sync Installation Guide

  • Once you click on install, Azure AD Sync will start installing components like SQL Express, Connectors etc.

Step by Step Azure AD Sync Installation Guide

  • After the installation of required components is completed, you’ll be prompted for below screen to provide your Azure AD Credentials. This needs to be your office 365 Global Admin credentials. We’re using as a service account created in part 1 of this series.

a (5)

  • After connecting with Office 365 using Global Admin Credentials, the next screen will be presented to enter your on prem active directory account credentials. In our case, We’ve already setup a service account in our local active directory and we will use the same account  here as shown below.

a (7)

  • After providing the credentials, click on Add Forest and Active Directory forest will be added as shown below. Repeat the same steps to add multiple forests.

a (8)


  • Next Screen will be presented for User Matching, You can uniquely identify your users based on criteria defined here. We’re using the default settings.

a (9)


  • Next screen will be presented to choose the Optional Features and the new features that comes with Azure AD Sync tool.

a (10)


  • Once you’re done with all the information and tool is able to connect with both on prem AD and Office 365 using the credentials provided during the configuration click on Configure to start the configuration

a (11)

a (12)

  • Once the configuration is completed, Click on Finish and the Wizard begins the process of synchronizing on prem identities with Office 365.

a (13)

  • To verify that the users have been synchronized with Office 365, login to Office 365 –> Users –> Active Users and verify the last sync time and Status.


By Default, Azure AD Sync tool Synchronized with office 365 after every 3 Hours. We can change this time at any time.

If you want to read the other Parts in this series, then please go to: