Remove claims token with regular expressions and Nintex on Office 365

Remove claims token with regular expressions and Nintex on Office 365

When you get the value of a person via Nintex Workflows, you often get a bit of a messy string back – it starts with “i:0#.f|” and may also be “i:0#.f|membership|” . That string is the claims token. Here’s how to get rid of it using the Regular Expression action on Office 365.

Are you looking for how to handle this on-premise? You need
How to Remove a Claims token using a Regular Expression

Normally the input string would be a variable, for example a lookup from a list. To make this a clear example I have used a static string.

On Office 365, you get the following string:

i:0#.f|membership|y01053@myclient.se;

To clean it up, you need the following regular expression:

i:0#.f[|]membership[|]

Here’s what the action looks like:

2016-01-28_16-48-57

Nintex doesn’t offer any way to test your regular expression on Office 365, like they do for the on premise version. You could test by running the workflow and emailing yourself the output. Alternatively, use a regex tester like Regex Storm:

2016-01-28_17-04-13