fhir-proxy icon indicating copy to clipboard operation
fhir-proxy copied to clipboard

Unable to make a Postman request to the FHIR Proxy URL

Open seatedro opened this issue 2 years ago • 4 comments

I have set up the FHIR Proxy according to the steps in this documentation: https://github.com/microsoft/fhir-proxy/tree/main/scripts#setup

I have added the Resource Reader and Writer permissions as well to the Service Principal and granted Admin Consent.

Used the Postman Environment that was generated and the Sample Postman Commands Collection to test the FHIR Proxy Endpoint. I have retrieved access token with the following URL: https://login.microsoftonline.com/{{tenantId}}/oauth2/token The GET Metadata request works, but unfortunately, when I try to GET patients, I am getting the following:

{
    "resourceType": "OperationOutcome",
    "id": "fb80820854f0254db3a4c725890b3ddd",
    "meta": {
        "lastUpdated": "2022-05-13T04:43:41.4825864+00:00"
    },
    "issue": [
        {
            "severity": "error",
            "code": "forbidden",
            "diagnostics": "Authorization failed."
        }
    ]
}

Is there a specific step that I am missing?

seatedro avatar May 13 '22 04:05 seatedro

it looks like the permissions grant did not work as it should - can you check the portal, it should look like the example in Step 3 - https://github.com/microsoft/fhir-proxy/tree/main/scripts#step-3--grant-admin-access-portal. If that does not help, then can you share the URL you are using (you can remove the tenant ID and server name).

daemel avatar May 16 '22 16:05 daemel

Okay here are the permissions granted as per Step 3 fhirproxy

The Authorization request and List Patients request are from this sample collection: https://github.com/microsoft/fhir-proxy/blob/main/samples/FHIR_Commands.postman_collection.json

seatedro avatar May 17 '22 10:05 seatedro

FWIW, I hit the same issue after doing setup steps end to end on a new deployment, the setup worked a few months ago.

JakeGinnivan avatar May 17 '22 13:05 JakeGinnivan

I don't see any changes in the main branch that would cause it to not work - but there has been continuous updates on the v2 branch (https://github.com/microsoft/fhir-proxy/tree/v2.0). if you are using Azure Health Data Services - FHIR, then please use V2. I will test against v2 and main today to see what I can determine.

daemel avatar May 17 '22 15:05 daemel

Closed to v2 version

sordahl-ga avatar Jul 18 '23 17:07 sordahl-ga