Skip to main content
Question

Create Multiple Active Directory Accounts from a Service Request


Chris.Armitage
Skilled Expert
Forum|alt.badge.img+1

I have a SR that allows our staff (im in education) to create ad-hoc user accounts, these are for guests coming in or open days.  
Currently it allows for one account to be created as the user will enter a username they want, the reason, and the date its needed.

The request is then fulfilled using the ActiveDirectory Orchestration by creating the AD account and then it sends the details to the requester via and email that  contains the accounts password.  The Account is then removed within 7days as part of the workflow.

I want to expand this so that multiple accounts could be created. I want the user to select how many with maybe a max of upto 20, but im struggling in my head the best way to do this, so any advice on this or best way would be apprciated.  If i was writing this as a Powershell script i could probably do it but im trying to get my head around how i can use a Service Request and the workflow behind it

Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+1
  • Top Contributor
  • 7 replies
  • March 21, 2025

Hi,

I am pretty sure you can extract username or datas from the SR and than put it in a Powershell app and create all of them manually.

For example on our freshservice, HR send us emails and I am able to extract some parts of this email, get a result and then use the result in powershell or any other app.

I use expression builder to get some details:
{{ ticket.description | strip_html | split: "Matricule:" | last | split: " " | first | replace: "\D", "" }}
This expression allow me to extract “Matricule: 123456” and the result will be 123456.

You will be able to do almost the same with anything from the ticket description.
No idea if it will work properly in your situation, but worth the try.


BTW, sorry for my english, Im french.


Hope it helps


Chris.Armitage
Skilled Expert
Forum|alt.badge.img+1
MaximeB wrote:

Hi,

I am pretty sure you can extract username or datas from the SR and than put it in a Powershell app and create all of them manually.

For example on our freshservice, HR send us emails and I am able to extract some parts of this email, get a result and then use the result in powershell or any other app.

I use expression builder to get some details:
{{ ticket.description | strip_html | split: "Matricule:" | last | split: " " | first | replace: "\D", "" }}
This expression allow me to extract “Matricule: 123456” and the result will be 123456.

You will be able to do almost the same with anything from the ticket description.
No idea if it will work properly in your situation, but worth the try.


BTW, sorry for my english, Im french.


Hope it helps

Hi there thank you for this…. yeah i did wonder about this way…… i guess its knowing what the description text will be and getting the expression right. the real issue is getting it to create multiple accounts in one go from one request

Thank you for your advice


Reply