Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Scriptrunner for Confluence - Get unsynced users

Michael F. May 27, 2020

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

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Jonny Carter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2020

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
}

TAGS
AUG Leaders

Atlassian Community Events