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')
- Microsoft Office 365
- Okta Expression Language (OEL)
- Attribute Mappings
- Provisioning
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.
To map the Usage Location, follow the steps below:
- Navigate to Directories > Profile Editor.
- Search for Microsoft Office 365 in the list of profiles.
- Click Mappings for Microsoft Office 365.
- On the top of the mappings screen, select Okta to O365.
- Scroll through the list and look for
UsageLocation. - Input the following for the field named
UsageLocation:source.countryCode!= "" AND source.countryCode!=null? source.countryCode : 'AU' - 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.
