microsoft / fhir-proxy

FHIR Proxy is a secure application that acts as an intermediary in the transfer of FHIR data to and from Azure API for FHIR/FHIR Server for Azure
MIT License
73 stars 50 forks source link

Cannot perform write operation on patient resource using postman with fhir proxy. #66

Closed Kedar782 closed 1 year ago

Kedar782 commented 2 years ago

Hello team,

I have added fhir proxy using the v2 branch. I used AAD as an identity provider also MSI as an authentication method. I followed this documentation to create a smart client. https://github.com/microsoft/fhir-proxy/tree/v2.0/scripts

After creating the smart client, I can get the access token using authorization code flow, and also I can get the patient resource. (Get request is working for patient resource). When I make a post request I'm getting a 401 error stating that Must have to Create/Write Permissions on resource type Patient.

Anybody here has any idea what I'm doing wrong here?

smart client name:- proxy10391-smart-client-2 fhir proxy:- sfp-proxy10391.azurewebsites.net fhir server:-fhirstandalonecli I'm adding some screenshots.

IAM blade for my fhir server:-(ADDING FHIR CONTRIBUTOR ROLE FOR MY FHIR PROXY) image

API Permissions for fhir proxy:-

image

App Roles for fhir proxy:- image

Scopes for fhir proxy:- image

API Permissions for smartclient:- image

Scopes and App roles are empty for smartclient.

Postman Operations:- Getting access token:- image Get Patient Resource using the access token above:- image Error for post request:- Header:- image Body:- image Authorization:- image

I will really appreciate your help. Thanks in advance!

sordahl-ga commented 1 year ago

Can you share the scopes granted in your access token.

Kedar782 commented 1 year ago

Solved with deleting the old proxy and deploying the new one.