How to set Timezone for Managed Atlassian Accounts via SCIM User Provisioning with Azure AD

Still need help?

The Atlassian Community is here for you.

Ask the community

 

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

The information in this page relates to customisations of the default SCIM User Provisioning config.

Atlassian Support cannot guarantee to provide any support for the steps described on this page as customisations are not covered under Atlassian Support Offerings.

Please reach out to Microsoft support, referencing this article, if there is any support required in regards to using expressions in Azure AD.

Summary

How to set Timezone for Managed Atlassian Accounts via SCIM User Provisioning with Azure AD.

Requirements

  • You have Atlassian Access with SCIM User Provisioning configured with Azure AD.
  • Your users are managed accounts with emails that match one of your verified domain(s).
  • You have some sort of timezone or location attribute for users in Azure.

Current Issue

  1. Timezone is one of the supported attributes for SCIM User Provisioning with Atlassian Access.
  2. In order for the timezone to be set however, the timezone value has to match the string values used by Atlassian Accounts, which can be found here:
  3. If the timezone values of users in Azure does not match any of the attributes in the Account preferences page above, it will not apply for the users.
    • Examples of unsupported timezones:
      • Sydney
      • Asia
      • GMT+8
      • GMT
  4. Not all of the supported timezone attributes are available or set correctly for users in Azure, and it will not be feasible to set the timezones for all users to match the Account preferences in Atlassian.

Workaround

  • We can use expressions when mapping attributes from Azure over to Atlassian Cloud.
  • First, make sure the Target attribute is set to timezone, as this is the attribute that will be read by Atlassian Cloud to set the user's timezone.
  • Next, change the Mapping type, from Direct, to Expression.
  • Now if both values required to form a supported attribute is present, you can use JOIN function to send over the timezone.
    • Join("/", [country], [city])
    • Explanation of operation:
      • If we have a "country" attribute for a user that contains the value "Australia".
      • And a "city" attribute for the same user which contains the value "Sydney".
      • The expression above will return the value "Australia/Sydney", and sets this timezone for the user.
  • If you do not have one or more of the supported attribute, or if the timezone value for the user is set in a different format, you can use the IIF function to check and return specific values.
    • IIF(IsNullOrEmpty([city]),"No City",IIF([city]="Sydney", "Australia/Sydney", IIF([city]="Hong Kong", "Asia/Hong Kong", "Add more cities here")))
    • Explanation of operation:
      • The first check uses the IsNullorEmpty function to confirm if the "city" attribute contains any values.
        • If it is empty, to returns "No City", and this value can be set to any default supported timezone if needed.
      • Next. it checks to see if the value matches any location or timezone that is used in Azure. 
        • For this example, it looks for "Sydney", and if this matches, it returns "Australia/Sydney.
        • We can change [city] to [timezone] or any other attribute that can be used to identify the user's location, like "GMT+10".
      • The rest of the expression expands on the IIF function, to add more locations.
  • You can build more custom expression using the Azure guide below.
Last modified on Oct 18, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.