Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Scriptrunner for Confluence - Get unsynced users


I know that it's possible to get the deactivated users in Confluence with userAccessor.isDeactivated(user).

But is there a way to get also the users which are unsynced from directory via Scriptrunner?

Best regards,

1 answer

0 votes

This is possibly using Atlassian's PersonService API. Here's an example script for the Script Console that gets all the unsynced users and lists their display names:

import com.atlassian.confluence.api.model.pagination.SimplePageRequest
import com.atlassian.confluence.api.service.people.PersonService
import com.onresolve.scriptrunner.runner.ScriptRunnerImpl

def personService = ScriptRunnerImpl.scriptRunner.getService(PersonService)'').fetchMany(new SimplePageRequest(0, 100)).results.collect { person ->

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events