Getting UnAuthorized 403 Error in Postman Read or Patch on Azure FHIR API

97 Views Asked by At

I'm using Azure FHIR API, Created and FHIR API, Registered an Client Application and added Azure Health Care APIS as well data FHIR contributor role for my user.

Trying to access this FHIR API via postman, I'm able to generate bearer token via client credentials, On passing this valid credentials to access FHIR I'm getting below error in Postman:

{
    "resourceType": "OperationOutcome",
    "id": "7fb05b3205cc7047f4f5365a8aabe325",
    "meta": {
        "lastUpdated": "2024-01-17T19:54:52.1235183+00:00"
    },
    "issue": [
        {
            "severity": "error",
            "code": "forbidden",
            "diagnostics": "Authorization failed."
        }
    ]
}

Postman Screenshot

I can make the Postman call for metadata to retrieve capabilitystatement, but I can't read or patch any other FHIR resource.

1

There are 1 best solutions below

0
Ikhtesam Afrin On

I have deployed all the resources needed for FHIR instance using this Doc.

In order to access the resources, you need to grant access to fhir instance -> Access Control (IAM) -> FHIR Data Contributor -> fhir container instance.

enter image description here

After granting the permission, generate the bearer token. Here I am trying to read Patient's data.

GET https://{fhir_instance_name}.azurehealthcareapis.com/Patient

enter image description here