Crowd Synchronisation with Azure AD fails with "java.lang.IllegalArgumentException: name argument cannot be null or blank"

Still need help?

The Atlassian Community is here for you.

Ask the community


Users are unable to authenticate with Azure Active Directory and the following appears in the atlassian-crowd.log:

com.atlassian.crowd.exception.OperationFailedException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: name argument cannot be null or blank
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
	at com.sun.proxy.$Proxy93.synchronise(Unknown Source)
	at com.atlassian.scheduler.core.JobLauncher.runJob(
	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(
	at com.atlassian.scheduler.core.JobLauncher.launch(
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJobWithRecoveryGuard(
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(
	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(
	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: name argument cannot be null or blank
	at java.util.concurrent.FutureTask.get(
	... 31 more
Caused by: java.lang.IllegalArgumentException: name argument cannot be null or blank
	at org.apache.commons.lang3.Validate.isTrue(
	at java.util.ArrayList.forEach(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
	... 1 more


  • When a Group is deleted from Azure Active Directory, Azure AD performs a soft delete and retains the Azure Active Directory (AD) Office 365 Group information for 30 days so it can still be restored if required

  • When Crowd polls information from Azure AD (using the REST API$select=displayName,id,members), the deleted Groups information are returned back as well

    • Crowd does not appear to handle the deleted group data coming back from Azure AD as it is expecting a displayName field and value from each JSON object (i.e. the Azure AD Group has a valid name)
    • It appears that deleted group data from Azure AD may not always contain the displayName field or at least a flag indicating the JSON object is marked as 'removed'
    • Known defect tracked under:  CWD-4998 - Getting issue details... STATUS


  • Create a script that uses the Azure Rest API to retrieve the group information from Azure AD as such:
    • Authenticate to Azure using Crowd's Web application ID and Key
    • Query Azure AD's delta query groups endpoint with this exact URL -$select=displayName,id,members
    • The endpoint will return a JSON response, the following actions should then be performed:
      • Look for:
        • "displayName": ""; or
        • "displayName": null; or
        • Absence of a "displayName" tag altogether

        • In the above screen shot example, the third item is not marked as '@removed' but all the items under members@delta are actually marked as "deleted"

    • (info) There may be an attribute called @odata.nextLink in the response JSON - that is a link to the next page of the results. Another request should be made to that URL to pull all Group information from Azure AD until there are no more results.

tip/resting Created with Sketch.

For easier viewing of the JSON response data in a graphical interface, you can use

tip/resting Created with Sketch.

It may be worth retrieving all the JSON response pages and start the analysis at the last results page as we have seen that Deleted Groups are returned at the end.


Follow the steps on the Microsoft guide to Permanently delete an Office 365 group (last section of the page) to force the deletion of the Groups within Azure Active Directory before the 30 days is up.

    1. Start a PowerShell
    2. Run this command on the PowerShell to see the list of soft-deleted Groups from Azure AD:


      1. This should return a list of IDs of the deleted groups - this list should match the "removed" JSON results identified in the Diagnosis section above that had no DisplayName tag
    3. Run this command on the PowerShell to purge out all the soft deleted group informationfrom Azure AD!

      Remove-AzureADMSDeletedDirectoryObject -Id <soft_deleted_groupid 1>
      Remove-AzureADMSDeletedDirectoryObject -Id <soft_deleted_groupid 2>

      Please be aware that the above will permanently purge the soft deleted Group Information from Azure Active Directory and the action cannot be undone!

    4. Run this command on the PowerShell to see the list of soft-deleted Groups from Azure AD (which should return nothing):


      1. (info) Please note that as per the above Microsoft KB, "In some cases it may take as long as 24 hours for the group and all of its data to be permanently deleted". So please allow up to 24 hours to confirm the results.
    5. You should now be able to retry the Sync with Azure Active Directory within Crowd and it should complete successfully!

(info) While bug CWD-4998 - Getting issue details... STATUS  has been marked as close, it may have regressed in newer versions of Crowd.  If this is the case and Crowd DataCenter 3.6 or higher is in use, another workaround would be to specify the groups to be used by Crowd by setting them within the group filter that's part of the Azure AD directory configuration.

Last modified on Jun 24, 2020

Was this helpful?

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