but I cannot get the Person from the properties |
do you mean that you have user login name (in correct format) and you are not able to convert it into Person object in people or group variable?
If so, I've tested it once and it worked for me following way
- I created text variable and set it to login name (account name or other unique user identifiers should work as well)
- I created people or group variable and set it to text variable
- in flexi task I set assignees to people or group variable
Yes, that's exactly what I'm trying to do. In fact, I tried your method but it fails at the second step because I cannot set the person variable (approver') to the text variable ('username').
- I tried this when creating the approver variable by setting its default value but that didn't work
- I tried it using the Set Variable action (see image) but it always generates an error saying:
"Workflow failed to get user profile for user: bruce.altner"
Thanks for the reply.
Here's an update. I had pretty much given up on this but decided to try again after reading that you got it to work. This time I defined username to include the claims-based token (e.g., i:0#.w|<domain><username>) instead of just <username>. This time it worked!
However, what I'd really like to use is the email address (because I'm much more likely to have that information available for the approver than the fully-qualified login name). See image. That still doesn't work. In that case I get this error:
"Workflow failed to get user profile for user: <my email address>"
hm, that's strange.
I've retested the scenario with mail address in my env and it works without problem.
I even noticed that if in set variable action I provide as a value mail address and press 'check names' icon, it immediately recognized user account and change the value to user object
does that work for you?
do you by any chance get mail address followed by a comma or semicolon? or possibly space?
I've experienced cases when this caused problem to resolve user account.
No, I get an error:
No exact match was found. Click the item(s) that did not resolve for more options.
I get the same error if I use the username without the claims token. But if I use the fully-qualified username, it works.
I think that what might be happening is about non-uniqueness. When I click on the item, as suggested, it shows multiple matches because I have several accounts (this is a test environment that supports both Windows and Forms authentication) with that name or email address. It doesn't know which one to return. I will try adding these to a collection variable and then selecting a single one.
yeah, that's it.
I've thought of that as well, but since you've written you do back and forth lookup between account and properties I somehow assumed you work with unique identifiers.