You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hello,
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,
Michael
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)
personService.search().forUnsyncedUsers('').fetchMany(new SimplePageRequest(0, 100)).results.collect { person ->
person.displayName
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.