Skip to main content

Hello,

I have a list that contains user accounts.  When trying to perform an O365 User Profile Lookup you need the User Principal Email address associated with the O365 account (this is really stupid).  There is an option to format the User Field for an email address but our User Principal Email addresses are not the same as our Primary Addresses so this formatting retrieves our Primary Email address which causes the lookup to fail.  The UPN email can be found by formatting for User Account but it gives you the full claims account (i:0#.f|membership|someone@domain.com).

 

How can I strip off the claims portion "i:0#.f|membership|" so that I have the correct email address to perform the User Profile Lookup?

 

Thank you,

Matt

I have tried an Expression to Replace the claims portions but the output still has the | characters...   

Here is the Log Output - varEmployeeUPNEmail "||someone@domain.com"

test1.JPG


Figured it out:

1. Use a Build String action to get the Employee field and format it as Plain Text.  Store this in a text variable.

2. Use an Extract Substring at Index action and set the index to 18.

a_email.JPG

a_extract.JPG


Hi

I would prefer RegEx which incidentally drives me insane!

I made a start

(?<=)(i:0#.f|membership).

See RegEx test:  http://regexstorm.net/tester?p=(%3f%3c%3d)(i%3a0%23.f%7cmembership).&i=i%3a0%23.f%7cmembership%7cdaniel.Smith%40domain.onmicrosoft.com

I just to figure out the reverse I guess or the rest of the characters in the iinput string

Daniel


Reply