Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FHIR Azure API Authentication Issue with Postman #55734

Closed
swapnilbjadhav opened this issue May 27, 2020 · 7 comments
Closed

FHIR Azure API Authentication Issue with Postman #55734

swapnilbjadhav opened this issue May 27, 2020 · 7 comments

Comments

@swapnilbjadhav
Copy link

swapnilbjadhav commented May 27, 2020

{
"resourceType": "OperationOutcome",
"id": "b1620bc940fca840a69fd351f4e8e2e4",
"issue": [
{
"severity": "error",
"code": "login",
"diagnostics": "Authentication failed."
}
]
}

the above result is from Postman when trying to do get on Patient resource. I believe there is some change in the authentication workflow. Hence, even after following the documentation the authentication fails. Anyone facing this similar issue for Azure FHIR Api?

I am facing the issue of 403 Forbidden through postman tutorial when trying to access /Patient resource.
In my audience i have added a valid URI and Allowed Object IDs is disabled. Token is also getting generated successfully through postman.

Below is the Authentication Setting

Authority: https://login.microsoftonline.com/XXXXXXXXXXXXXXXX
Audience: https://XXXXXXXX.azurehealthcareapis.com
Allowed Object IDs: diabled
note: Use Azure Access Control (IAM) to grant access your FHIR service when using the subscription tenant for data plane RBAC.
SMART on FHIR proxy: unchecked

{
"resourceType": "OperationOutcome",
"id": "ee7e49d7d4cf234381f938e8d1570f5b",
"issue": [
{
"severity": "error",
"code": "forbidden",
"diagnostics": "Authorization failed."
}
]
}


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@swapnilbjadhav swapnilbjadhav changed the title Authentication Failed issue FHIR Azure API Authentication Issue with Postman May 27, 2020
@AjayKumar-MSFT
Copy link
Contributor

@swapnilbjadhav, Thanks for the question! We are taking a look into this and will get back to you soon.

@hansenms
Copy link
Contributor

If you have allowed object ids disabled, you are using Azure RBAC, which means that the user or service principal that the token is issued for must be assigned a FHIR data plane role:

https://docs.microsoft.com/en-us/azure/healthcare-apis/configure-azure-rbac

@swapnilbjadhav
Copy link
Author

Thanks it's working now. we can close this issue

@hansenms
Copy link
Contributor

hansenms commented Jun 1, 2020

#please-close

@LaRiffle
Copy link

LaRiffle commented Nov 9, 2020

Hey!
I'm getting the same error, I have added the app to a Role following the advice of @hansenms but I still have the same error... Any advice?

@shahhussain88
Copy link

https://www.youtube.com/watch?v=1ORQGcPht5Q
watch this its easy to understand

@Wiiki0807
Copy link

Wiiki0807 commented Apr 13, 2022

FHIR

we must add both "user" and "app" in FHIR IAM to resolve auth fail issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests