question

Shriram-7698 avatar image
0 Votes"
Shriram-7698 asked swethabadam-7624 commented

Problems in accessing Azure API for FHIR with Postman

I followed the steps as per the document in "https://docs.microsoft.com/en-us/azure/healthcare-apis/access-fhir-postman-tutorial" to set up the FHIR API and registered a client application with "FHIR Data Contributor" access level. And I am able to get the metadata in Postman. But when i try to access the Patient resource, instead of the response code 200-OK it is still giving 403_Forbidden error after using the right token. Did anyone faced the similar issue while setting it up?

azure-api-fhir
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AnuragSharma-MSFT avatar image
1 Vote"
AnuragSharma-MSFT answered

Hi @Shriram-7698, welcome to Microsoft Q&A forum.

This issue is mostly related to adding the configuring RBAC roles for the Azure FHIR service. While adding the role assignment, please select the user too as mentioned in the below screenshot and then try doing a Get Request.

37008-image.png

Also assuming that you have created the access token already as mentioned in the article.

Please let me know if this helps or else we can discuss further.


if answer helps, please select 'Accept Answer' as this could help other community members looking for similar queries.




image.png (38.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Shriram-7698 avatar image
0 Votes"
Shriram-7698 answered AnuragSharma-MSFT commented

Thanks @AnuragSharma-MSFT. That solution worked for me. But if i give the user, "FHIR Data Contributor" access, then the applications created by the user should automatically inherit the same access level right? Or Should we have to explicitly assign the role to the client application that the user creates next?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Shriram-7698, glad it worked out for you.

Also if possible, could you please provide more information on which applications are you talking about?

0 Votes 0 ·
Shriram-7698 avatar image
0 Votes"
Shriram-7698 answered

40972-screen-shot-2020-11-18-at-84348-pm.png



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Shriram-7698 avatar image
0 Votes"
Shriram-7698 answered AnuragSharma-MSFT commented

@AnuragSharma-MSFT Will the Apps inherit the same access level as the user who generated them as above?

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Shriram-7698, I am looking into it and get back to you at the earliest.

1 Vote 1 ·

Hi @Shriram-7698, if we have registered the app in Azure active Directory and provided the permission of user_impersonation as mentioned in below screenshot, we don't need to assign the roles to Apps. They should inherit from the same signed-in user. But yes that user should be added to the specific roles:


42084-image.png


1 Vote 1 ·
image.png (75.5 KiB)
NandanShanbhag-1580 avatar image
0 Votes"
NandanShanbhag-1580 answered AnuragSharma-MSFT commented

Hello @AnuragSharma-MSFT ,

I have been trying to get the same issue working for me, but unable to get authentication for the https://XXXX.azurehealthcareapis.com/Patient call working for me in Postman. I had to stop the tutorial after attempting this for multiple days as I got charged for running the FHIR service
41515-image.png



image.png (72 B)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @NandanShanbhag-1580, could you please elaborate the exact step where you were facing the issue? Also are you following the same document as mentioned in the question at the top?

0 Votes 0 ·
NandanShanbhag-1580 avatar image
1 Vote"
NandanShanbhag-1580 answered swethabadam-7624 commented

Thanks @AnuragSharma-MSFT for getting back to me. I did use the same exact tutorial and double checked to make sure I gave FHIR Data Contributor role to the client app as well as my MSFT account.
I also ensured that the token was created as per the tutorial.

The 401 I got was during testing the get patient API call from postman. I have deleted the resource as I was getting charged for running it, so I cannot provide the actual error now.

42140-image.png



image.png (61.2 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks @AnuragSharma-MSFT, I am also facing same issue from long time.
Through Web App i am able to authenticate via Azure AD But i am getting below error. (Followed as per documentation)
Please help if you know any blog to test Azure FHIR API with Postman.
{
"resourceType": "OperationOutcome",
"id": "96c012d38bf0c44e891d8b117faa73fc",
"issue": [
{
"severity": "error",
"code": "login",
"diagnostics": "Authentication failed."
}
]
}

0 Votes 0 ·

Im facing the same issue. Did anyone figure out the solution. IF yes, please help me.

0 Votes 0 ·