Forums

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

Creating ENTRA-Groups with Scriptrunner for JIRA

Atlassianist
Contributor
March 24, 2025

Hello, 

 

we are trying to automate our JIRA / Confluence workflow. (DataCenter)

Services to be automated:

1. Copy an existing JIRA template and create a new project

2. create a new Comfluence Space 

etc. 

as we use ENTRA Groups for permission management, the same groovy script has to trigger a powershell script and forward some variable to it.

This 2nd Powershell Script has to connect via MS Graph and create the groups. 

I think with this script we can make execute the PS-Script at the and of the Groovy Script. 

 

def issueKey = issue.key 
def customFieldValue = issue.getCustomFieldValue(customField)
def command = "powershell.exe -ExecutionPolicy Bypass -File 
C:\\Scripts\\meinSkript.ps1 ${issueKey} '${customFieldValue}'" 
def process = command.execute() 
process.waitFor() 
def output = process.text 
log.info("PowerShell Output: $output")

Question:

Is is technically a viable way to work or are there better options to create groups - via Scriptrunner for JIRA - in M$ ENTRA?

 

Best regards

Atlassianist. 

//Sorry, we are working on DataCenter. The Category of the thread is not correct//

 

1 answer

0 votes
Mercy
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 Champions.
December 10, 2025

Running external PowerShell scripts from ScriptRunner on Jira Data Center works technically, but it’s not the cleanest or most secure integration path. ScriptRunner runs inside the Jira JVM, so when you call `command.execute()`, it spawns a system process on the application node. That means the script executes under the same OS user running Jira, which can cause permission and security issues, especially if the node isn’t allowed to run PowerShell or reach Microsoft Graph. Atlassian doesn’t provide native hooks for managing Entra (Azure AD) groups, so ScriptRunner can only call out to external systems like you’re doing.

Suggest an answer

Log in or Sign up to answer