azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

JSON payload mismatch for presentation callback example

Open mtakemoto opened this issue 3 years ago • 1 comments

Hi Folks,

My team and I have recently started using the new GA Verified ID API and came across a difference in what's being returned from the API and what the docs say:

Actual:

{
  "requestId": "bae6704d-73a5-47c8-9d1c-83b2328e6c79",
  "requestStatus": "presentation_verified",
  "state": "guid-abc-state",
  "receipt": {
    "id_token": "...",
    "vp_token": "...",
    "state": "..."
  },
  "verifiedCredentialsData": [
    {
      "issuer": "did:ion:issuer",
      "type": ["VerifiableCredential", "TrueIdentity"],
      "claims": {
        "claim1": "value",
        "claim2": "value"
      },
      "credentialState": { "revocationStatus": "VALID" },
      "domainValidation": { "url": "https://did.woodgrovedemo.com/" }
    }
  ],
  "subject": "did:ion:subject"
}

Expected/Docs example From the section starting "the following example demonstrates a callback payload..."

{
  "requestId": "e4ef27ca-eb8c-4b63-823b-3b95140eac11",
  "requestStatus": "presentation_verified",
  "state": "92d076dd-450a-4247-aa5b-d2e75a1a5d58",
  "subject": "did:ion:EiAlrenrtD3Lsw0GlbzS1O2YFdy3Xtu8yo35W<SNIP>…",
  "issuers": [
    {
      "type": [
        "VerifiableCredential",
        "VerifiedCredentialExpert"
      ],
      "claims": {
        "firstName": "Megan",
        "lastName": "Bowen"
      },
      "domain": "https://contoso.com/",
      "verified": "DNS",
      "authority": "did:ion:….."
    }
  ],
  "receipt": {
    "id_token": "eyJraWQiOiJkaWQ6aW<SNIP>"
  }
}

I was able to repro this just now against the endpoint https://verifiedid.did.msidentity.com/v1.0/verifiableCredentials/createPresentationRequest with the payload below. Just let me know if you need any additional data.

Request Payload:

{
  "includeQRCode": true,
  "callback": {
    "url": "{{callbackUrl}}",
    "state": "guid-abc-state"
  },
  "authority": "{{authority}}",
  "registration": {
    "clientName": "Entra Verified ID Postman"
  },
  "includeReceipt": true,
  "requestedCredentials": [
    {
      "type": "TrueIdentity",
      "purpose": "Test",
      "acceptedIssuers": [
        "{{authority}}"
      ],
      "configuration": {
        "validation": {
          "allowRevoked": true,
          "validateLinkedDomain": true
        }
      }
    }
  ]
}

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

mtakemoto avatar Aug 16 '22 23:08 mtakemoto

@mtakemoto Thanks for posting. I have added the content author of this document to review the request. @barclayn FYI.

RohitMungi-MSFT avatar Aug 17 '22 06:08 RohitMungi-MSFT

@mtakemoto thank you for pointing this out. The article now shows the correct examples. #please-close

barclayn avatar Jan 18 '23 12:01 barclayn