Logic App parse keeps failing

Michael Fleet 101 Reputation points
2025-04-28T09:41:30.54+00:00

With reference to my previous question -

https://learn.microsoft.com/en-us/answers/questions/2260999/set-default-value-for-handling-null-values-in-entr

I keep getting a schema validation failure on the output from the JavaScript -

 User's image

User's image

I've downloaded the output and used this to create the schema but it still fails -

User's image

Does it need to be re-parsed, and if so, how do I create the correct schema for a large data output?

@RithwikBojja

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
0 comments No comments
{count} votes

Answer accepted by question author
  1. RithwikBojja 3,210 Reputation points Microsoft External Staff Moderator
    2025-04-28T09:52:42.1+00:00

    Hi @Michael Fleet ,

    Does it need to be re-parsed, and if so, how do I create the correct schema for a large data output?

    It needs to be re-parsed, if you want to use the Json properties/key value pair. Else no need to parse it.

    Below Json schema works for me:

    
    {
    
      "type": "array",
    
      "items": {
    
        "type": "object",
    
        "properties": {
    
          "userPrincipalName": {
    
            "type": "string"
    
          },
    
          "id": {
    
            "type": "string"
    
          },
    
          "signInActivity": {
    
            "type": "object",
    
            "properties": {
    
              "lastSignInDateTime": {
    
                "type": "string",
    
                "format": "date-time"
    
              },
    
              "lastSignInRequestId": {
    
                "type": ["string", "null"]
    
              },
    
              "lastNonInteractiveSignInDateTime": {
    
                "type": ["string", "null"],
    
                "format": "date-time"
    
              },
    
              "lastNonInteractiveSignInRequestId": {
    
                "type": ["string", "null"]
    
              },
    
              "lastSuccessfulSignInDateTime": {
    
                "type": ["string", "null"],
    
                "format": "date-time"
    
              },
    
              "lastSuccessfulSignInRequestId": {
    
                "type": ["string", "null"]
    
              }
    
            },
    
            "required": [
    
              "lastSignInDateTime"
    
            ]
    
          }
    
        },
    
        "required": [
    
          "userPrincipalName",
    
          "id",
    
          "signInActivity"
    
        ]
    
      }
    
    }
    
    

    enter image description here

    Output:

    enter image description here


    If this answer was helpful, please click "Accept the answer" and mark Yes, as this can help other community members.

    enter image description here

    If you have any other questions or are still experiencing issues, feel free to ask in the "comments" section, and I'd be happy to help.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.