{
  "$kind": "Microsoft.AdaptiveDialog",
  "$designer": {
    "id": "1dAZlt",
    "name": "WhoIsPersonDialog",
    "description": ""
  },
  "autoEndDialog": true,
  "defaultResultProperty": "dialog.result",
  "triggers": [
    {
      "$kind": "Microsoft.OnBeginDialog",
      "$designer": {
        "name": "BeginDialog",
        "description": "",
        "id": "XToxGY"
      },
      "actions": [
        {
          "$kind": "Microsoft.IfCondition",
          "$designer": {
            "id": "rqPdz8"
          },
          "condition": "= not(exists($UserFound))",
          "actions": [
            {
              "$kind": "Microsoft.BeginDialog",
              "$designer": {
                "id": "YfiAYu"
              },
              "activityProcessed": true,
              "dialog": "FindPersonDialog",
              "resultProperty": "$UserFound",
              "options": {
                "nameEntity": "=$nameEntity"
              }
            },
            {
              "$kind": "Microsoft.SetProperty",
              "$designer": {
                "id": "m4XKv3"
              },
              "property": "$WasUserFoundSupplied",
              "value": false
            }
          ],
          "elseActions": [
            {
              "$kind": "Microsoft.TraceActivity",
              "$designer": {
                "id": "hwsKVX"
              },
              "valueType": "String",
              "label": "FoundId",
              "name": "FoundId",
              "value": "=dialog.userId"
            },
            {
              "$kind": "Microsoft.SetProperty",
              "$designer": {
                "id": "9DAueZ"
              },
              "property": "$WasUserFoundSupplied",
              "value": true
            }
          ]
        },
        {
          "$kind": "Microsoft.IfCondition",
          "$designer": {
            "id": "hFpZL4"
          },
          "condition": "= $UserFound != null && exists($UserFound)",
          "actions": [
            {
              "$kind": "Microsoft.TraceActivity",
              "$designer": {
                "id": "b9hhH2"
              },
              "name": "UserId",
              "label": "UserId",
              "valueType": "String",
              "value": "=dialog.userId"
            },
            {
              "$kind": "Microsoft.Graph.Photo.GetPhoto",
              "$designer": {
                "id": "rYukBT"
              },
              "resultProperty": "dialog.ResultPhoto",
              "token": "=user.token.token",
              "userId": "=$UserFound.Id"
            },
            {
              "$kind": "Microsoft.Graph.User.GetUserProfile",
              "$designer": {
                "id": "ZW7CBi"
              },
              "token": "=user.token.token",
              "userId": "=$UserFound.Id",
              "resultProperty": "dialog.Result"
            },
            {
              "$kind": "Microsoft.TraceActivity",
              "$designer": {
                "id": "YumZ1w"
              },
              "name": "JsonResult",
              "label": "JsonResult",
              "valueType": "String",
              "value": "=dialog.Result"
            },
            {
              "$kind": "Microsoft.IfCondition",
              "$designer": {
                "id": "TXZ2C6"
              },
              "condition": "=$WasUserFoundSupplied == true",
              "elseActions": [
                {
                  "$kind": "Microsoft.SendActivity",
                  "$designer": {
                    "id": "dTcyKk"
                  },
                  "activity": "${SendActivity_dTcyKk()}"
                }
              ]
            },
            {
              "$kind": "Microsoft.SendActivity",
              "$designer": {
                "id": "ryFbw6"
              },
              "activity": "${SendActivity_ryFbw6()}"
            }
          ],
          "elseActions": [
            {
              "$kind": "Microsoft.SendActivity",
              "$designer": {
                "id": "lcoztE"
              },
              "activity": "${SendActivity_lcoztE()}"
            }
          ]
        },
        {
          "$kind": "Microsoft.EndDialog",
          "$designer": {
            "id": "XYzO24"
          }
        }
      ]
    }
  ],
  "generator": "WhoIsPersonDialog.lg",
  "recognizer": "WhoIsPersonDialog.lu.qna",
  "id": "WhoIsPersonDialog"
}
