Jump to content

Anyway to change the captured data inserted into a BPM node for Azure automation?


Recommended Posts

Hi All

I have a process we are working on where we ask the customer for their full email which must be in an @nhs.net email format. In the IC I have regex configured so it must be in a format firstname.surname@nhs.net

However when we use this data to output to Azure it needs to be in a certain UPN format. For this format to work correctly I need to insert the email but only the firstname.surname portion, and want to exclude everything after their name i.e. exclude @nhs.net

Is there anyway I can apply ESP conditions in this scenario? Ideally I want the customer to enter the full email when raising the request but if it is not possible to strip out the @nhs.net part we capture in the BPM I will look to ask the customer to just insert the email but exclude @nhs.net

Many thanks as always

Link to comment
Share on other sites

1 hour ago, Adrian Simpkins said:

However when we use this data to output to Azure it needs to be in a certain UPN format.

How is this outputted to Azure? ESP Conditions are an email function and show or hide variables based on an expression, I can't see how they would help here.

If all of the emails end @nhs.net then you could ask for (and enforce with Regex validation) the firstname.surname format and append the @nhs.net where necessary.

Link to comment
Share on other sites

Hi @Adrian Simpkins,

There are a few solutions.

You could modify the IC to ask for the firstname.surname instead or alongside the email address.

You could also create a Human Task to have one of your people to sanity check and insert the (correct) firstname.surname for processing.

Finally, you might want to have a look under Hornbill Automation where there is a set of "String Utilities" under the "Scope" of "Application" - you'll need the RegEx Substring with a "Regular Expression" of:

(.*)\@nhs\.net

and "Flags" as:

/0,1

that should "result" in what you are looking for.

  • Like 1
Link to comment
Share on other sites

Hi @Adrian Simpkins,

Are these email addresses already in Azure? If so, we could provide a new Azure operation that will allow you to provide the email address to return a users details (which will include UPN etc). Would that work for you, rather than attempting to chop & change the users inputted email address? 

Cheers,

Steve

Link to comment
Share on other sites

Hi @Adrian Simpkins,

Had a few spare mins so added a new operation that will return the details of an Azure user object for a given email address (with an optional accountEnabled property value). Let me know if this helps.

Cheers,

Steve

Link to comment
Share on other sites

HI Sam and Steve - thank you for the responses - i was off so apologies i am only replying today

When setting a UPN in Azure as an example my email is adrian.simpkins@nhs.net but in Azure the UPN is set as firstname.surname_nhs.net#EXT#@MidandSouthEssexNHS.onmicrosoft.com so this was why i was looking to see how to inject this into the BPM node. I am presuming the new function for pulling the data back in would sit after the initial Invite User node, then I would inject the outcome data into the follow on Update User / Update User group nodes? I will setup a script and give it a try once confirmed - thank you

If this of course doesn't work I may look at your suggestion Sam to just ask for firstname.surname - we already have a task in place in the process for our 1st line team to do some sanity checks so this would be a good alternative - thank you for the suggestion

 

Link to comment
Share on other sites

Hi @Adrian Simpkins,

Now I understand the requirements a bit better, you could actually perform this prior to the new operation.

The Invite User operation has an output called Invited User ID. You can feed the content of that output into the Get User operation, which will then return all the relevant information about the invited user (including the Azure-generated UPN):

image.png

Cheers,

Steve

  • Like 1
Link to comment
Share on other sites

Hi Steve

Just a quick update to confirm it works perfectly extracting the UPN and inserting into the follow on nodes - many thanks for the prompt action as always !

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...