Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner for Confluence - Get unsynced users

Franz, Michael
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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
atlassian, out of office, loom, confluence, async collaboration, meeting recaps, remote teamwork, team alignment, knowledge sharing, AI-powered notes, productivity tools, workforce continuity, teamwork collection

Put your meeting notes on autopilot with Loom + Confluence

AI-powered meeting notes keep work moving even if you’re out of the office. Enjoy your well-deserved time off and return refreshed, confident you’ll catch up in no time.

Learn more
AUG Leaders

Atlassian Community Events