# 401 errors when searching for a patient (INT)

**URL:** <https://developer.community.nhs.uk/t/401-errors-when-searching-for-a-patient-int/10259>\
**Category:** Personal Demographics Service (PDS)\
**Tags:** pds, fhir, spine\
**Created:** [22 January 2026 15:02 UTC](https://developer.community.nhs.uk/t/401-errors-when-searching-for-a-patient-int/10259 "2026-01-22T15:02:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesG](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@JamesG](https://developer.community.nhs.uk/u/JamesG)\
**Post date:** [22 January 2026 15:02 UTC](https://developer.community.nhs.uk/t/401-errors-when-searching-for-a-patient-int/10259/1 "2026-01-22T15:02:48Z")

</div>

Hi, I’m receiving 401 errors from the patient lookup in PDS. Our application ID is _ **d3317c61-3c51-4b7e-8770-f42a9d9c6885** _, and this is set up with:

- personal-demographics-int-privileged-application-restricted,
- personal-demographics-int-application-restricted, and
- e-referrals-service-api-int-application-restricted permissions.

Any help appreciated.

```auto
{
    "status_code": 401,
    "url": "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9728331355",
    "error_body": {
      "issue": [
        {
          "code": "forbidden",
          "details": {
            "coding": [
              {
                "code": "ACCESS_DENIED",
                "display": "Access Denied - Unauthorised",
                "system": "https://fhir.nhs.uk/R4/CodeSystem/Spine-ErrorOrWarningCode",
                "version": "1"
              }
            ]
          },
          "severity": "error"
        }
      ],
      "resourceType": "OperationOutcome"
    },
    "event": "http_error_response",
    "level": "error",
    "timestamp": "2026-01-22T14:47:56.848335Z"
  }

```

---

<div class="post-metadata">

**Author:** ![Adrian\_Hall](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/adrian_hall/32/587_2.png) [@Adrian\_Hall](https://developer.community.nhs.uk/u/Adrian_Hall)\
**Post date:** [23 January 2026 13:45 UTC](https://developer.community.nhs.uk/t/401-errors-when-searching-for-a-patient-int/10259/2 "2026-01-23T13:45:40Z")

</div>

> [@JamesG](#):
>
> personal-demographics-int-privileged-application-restricted

Please remove `personal-demographics-int-privileged-application-restricted` and try again.  
This is an access mode that is not for general use.
