Uploaded image for project: 'Crowd'
  1. Crowd
  2. CWD-4998

Azure AD synchronisation can fail with IllegalArgumentException: name argument cannot be null or blank

    XMLWordPrintable

    Details

    • Feedback Policy:

      Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Description

      Problem

      During Azure AD synchronization, some returned messages regarding group removals might not be parsed correctly, resulting in the synchronization failing with an exception like:

      2017-12-03 13:51:02,527 Caesium-2-3 ERROR [atlassian.crowd.directory.DbCachingDirectoryPoller] Error occurred while refreshing the cache for directory [ 131074 ].
      com.atlassian.crowd.exception.OperationFailedException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: name argument cannot be null or blank
      	at com.atlassian.crowd.directory.cache.DeltaQueryCacheRefresher.synchroniseAllGroups(DeltaQueryCacheRefresher.java:328)
      	at com.atlassian.crowd.directory.cache.DeltaQueryCacheRefresher.synchroniseAll(DeltaQueryCacheRefresher.java:91)
      	at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:968)
      	at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:71)
      
      ...
      Caused by: java.lang.IllegalArgumentException: name argument cannot be null or blank
      	at org.apache.commons.lang3.Validate.isTrue(Validate.java:158)
      	at com.atlassian.crowd.model.group.GroupTemplate.<init>(GroupTemplate.java:35)
      	at com.atlassian.crowd.model.group.GroupTemplate.<init>(GroupTemplate.java:56)
      	at com.atlassian.crowd.directory.rest.mapper.AzureAdRestEntityMapper.mapDeltaQueryGroup(AzureAdRestEntityMapper.java:216)
      	at com.atlassian.crowd.directory.rest.mapper.AzureAdRestEntityMapper.lambda$mapDeltaQueryGroups$4(AzureAdRestEntityMapper.java:147)
      	at java.util.ArrayList.forEach(ArrayList.java:1249)

      Suspected cause

      1. Azure AD is returning soft-deleted Groups where the JSON group object is missing the displayName field
        • Azure AD only purges soft-deleted Group Information after 30 days

      Workaround

      1. In some cases disabling incremental synchronization, or recreating the affected directory in Crowd might alleviate this.
      2. Permanently purge the soft-deleted group information from Azure Active Directory prior to the 30 days by following the workaround described in Crowd Synchronisation with Azure AD fails with "java.lang.IllegalArgumentException: name argument cannot be null or blank" KB article

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              ppetrowski Patryk
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: