Outlook Email Address Property

I am trying to get the email address of the logged on user using the following relevance. In a small percent, it errors with “singular expression refers to non-unique object”. I tried placing “unique values of” in a couple of different places without success.

concatenations ";" of (if exists logged on user or exists current user then (values 
"EmailAddress" of it as string) of keys of key 
"SOFTWARE\Microsoft\Office\16.0\Common\Identity\identities" of current user 
keys (logged on users) of registry else "<none>")

Since there are multiple users logged on, you’re getting that ‘non-unique object’ message. It looks like you’ve pluralized the relevance but missed one spot - keys "SOFTWARE\....

Try

concatenations ";" of (if exists logged on user or exists current user then (values 
"EmailAddress" of it as string) of keys of keys 
"SOFTWARE\Microsoft\Office\16.0\Common\Identity\identities" of current user 
keys (logged on users) of registry else "<none>")

One issue to note is this property will constantly change value as users log on and off though.

1 Like

That did it! Thanks Jason

1 Like