<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Setting Office 365 Usage Location
Lifecycle Management
Okta Integration Network
Okta Classic Engine
Okta Identity Engine
Overview

While attempting to set the Microsoft Office 365 usage location, the following error message is displayed:

Invalid property msExchUsageLocation in expression hasDirectoryUser()?(findDirectoryUser().msExchUsageLocation!=null?findDirectoryUser().msExchUsageLocation:(source.countryCode!=null? source.countryCode : 'US')):(source.countryCode!=null? source.countryCode : 'US')

 

Applies To
  • Microsoft Office 365
  • Okta Expression Language (OEL)
  • Attribute Mappings
  • Provisioning
Cause

Typically, the following value below is indicated in the Usage Location attribute in Office 365 when Active Directory has been integrated with the Directory integration:

hasDirectoryUser()?(findDirectoryUser().msExchUsageLocation!=null?findDirectoryUser().msExchUsageLocation:(source.countryCode!=null? source.countryCode : 'US')):(source.countryCode!=null? source.countryCode : 'US')

As hasDirectoryUser() is only applicable to Active Directory, using the OEL above will not work if Active Directory is not integrated.

Solution

To map the Usage Location, follow the steps below:

  1. Navigate to Directories > Profile Editor.
  2. Search for Microsoft Office 365 in the list of profiles.
  3. Click Mappings for Microsoft Office 365.
  4. On the top of the mappings screen, select Okta to O365.
  5. Scroll through the list and look for UsageLocation.
  6.  Input the following for the field named UsageLocation:
    source.countryCode!= "" AND source.countryCode!=null? source.countryCode : 'AU'
  7. Click Save Mappings.

 

NOTE: UsageLocation accepts only values that are formatted using the ISO 3166-1 alpha-2 two-letter country code. More details about this ISO standard can be found using the Online Browsing Platform (OBP) page.

Loading
Setting Office 365 Usage Location