Logic App reporting exception for specific naming pattern

Prabin Paudel 21 Reputation points
2021-09-29T16:20:40.4+00:00

We have a logic app that updates work item with comment and new assignee. The logic app keeps reporting exception for a user with this naming pattern ‘FirstName LastName (CAT)’. Do you think it could be the naming that causes the error?

After researching the developer community questions for a bit, I realized that if a user is not a project member, it could cause this kind of issue as well.

However, if I go to the project and manually change the assignee, that could work (and the assignee is in the dropdown list).

=============

Just FYI, the input to the logic app looks like this:

{
    "method": "patch",
    "queries": {
        "account": "office",
        "project": "OE"
    },
    "path": "/_apis/wit/workitems/1234567",
    "host": {
        "connection": {
            "name": "/subscriptions/subscription_id/resourceGroups/upkeep-prod/providers/Microsoft.Web/connections/visualStudioTeamServices"
        }
    },
    "body": {
        "title": "work item title",
        "area": "work\\item\\path",
        "userEnteredFields": {
            "System.AssignedTo": "First Last (CAT)"
        }
    }
}

For note, this question was first asked in developer community and they advised to ask to specific product support.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,829 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,651 Reputation points Microsoft Employee
    2021-10-19T19:28:43.63+00:00

    Hello @Prabin Paudel - I'm responding on behalf of Anurag so please tag me if you have further queries on this matter.

    It seems that you are attempting to reference users by their displayName (of AAD attribute) for work item assignment but Azure Boards doc states that the System.AssignedTo is a reference type that's pre-defined by the system: https://learn.microsoft.com/en-us/azure/devops/boards/work-items/work-item-fields?view=azure-devops#system-and-predefined-fields

    We also find here that the System.AssignedTo is of String data type and corresponds to entries in AAD user accounts, and synchronization occurs between Azure Boards and AAD for person-name and other fields. This is where, I believe, you may be running into issues where the LA connector is expecting a value that complies with that of reference field, but instead, it's receiving a value from displayName (which let you define custom formatting for the full name of the users as: Firstname Lastname (CAT)).

    For more info on Reference names and why they are needed in Portability of definitions across integrations, please review: Field reference names and portability

    The reason why you get the displayName as expected with manual assignment is probably because the People picker tool in Azure Boards is automatically synchronizing fields from AAD behind the scenes.

    I hope this helps understand what you have observed above, please tag me and let me know if you have more questions.