0

Is it possible to create an application the uses B2C identity provider and writes to the Azure FHIR service?

All the B2C examples I have encountered only read for the FHIR service (e.g. https://learn.microsoft.com/en-us/azure/healthcare-apis/fhir/azure-ad-b2c-setup), and the FHIR service configuration only allows Read data actions/scopes (see after step 10 here: https://learn.microsoft.com/en-us/azure/healthcare-apis/fhir/troubleshoot-identity-provider-configuration).

Is there a way around this? I would like my B2C users to be able to write data to FHIR.

2 Answers 2

0

I have never used FIHR, but this post shows how to write to it.

This is via API, and B2C can call API.

However, I'm unsure if FIHR will accept a B2C access token.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the feedback. Yes, there is an API to the azure FHIR service. I use it to read content using a B2C access token. The issue I have is when trying to write. It seems write scopes are not available (see after step 10 here: learn.microsoft.com/en-us/azure/healthcare-apis/fhir/…). I'm wondering what is the right approach is when I want B2C users to write content to FHIR.
0

Limiting access to the FHIR service via a generic API is a good way to get full control and customizability over the Access-Control, validation, and any other intermediary function.

You can then configure this service to access the FHIR store and insert the middleware necessary in it to handle your tokens.

The FHIR service is secured by Microsoft Entra ID that can't be disabled. To access the service API, you must create a client application (also referred to as a service principal) in Microsoft Entra ID, and grant it the right permissions.

2 Comments

Yes, I currently have the client app set up in Entra with the FHIR Contributor role. However, it's possible to bypass Entra using Azure AD B2C as an identity provider (first link in my post). But Microsoft restricts this to "Read" data actions (second link in my post). Since data actions are configurable (though locked) in FHIR, I believe "Write" data actions may become available or there might be a workaround. Implementing RBAC with an intermediate service principal seems like a lot of work, especially if "Write" actions will be enabled soon, but it seems there is no workaround.
Agreed, however it is a solution :) And a reverse-proxy with a bit of business logic can be written fairly quickly if efficient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.