Edit

Share via


Use Microsoft Entra External ID to grant access to the FHIR service

Healthcare organizations can use Microsoft Entra External ID with the FHIR® service in Azure Health Data Services to grant access to their applications and users.

Create an Entra External ID tenant for the FHIR service

Creating an Entra External ID tenant for the FHIR service sets up a secure infrastructure for managing user identities in your healthcare applications.

If you already created an Entra External ID tenant, you can skip to Deploy the FHIR service with Entra External ID.

Deploy an Entra External ID tenant by using an ARM template

Use PowerShell or Azure CLI to deploy the ARM template programmatically to an Azure subscription. For more information about syntax, properties, and usage of the template, see Deploy an instance of Entra External ID.

Run the code in Azure Cloud Shell or in PowerShell locally in Visual Studio Code to deploy the FHIR service to the Entra External ID tenant.

  1. Use Connect-AzAccount to sign in to Azure. After you sign in, use Get-AzContext to verify the subscription and tenant you want to use. Change the subscription and tenant if needed.

  2. Create a new resource group (or use an existing one) by skipping the "create resource group" step, or commenting out the line starting with New-AzResourceGroup.

### variables
$tenantid="your tenant id"
$subscriptionid="your subscription id"
$resourceGroupName="your resource group name"
$location="your desired location"
$directoryName="your entra external id tenant name(don't include .onmicrosoft.com)"

### login to azure
Connect-AzAccount -Tenant $tenantid -SubscriptionId $subscriptionid 

# create the resource group
New-AzResourceGroup -Name $resourceGroupName -Location $location

# deploy the resource
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri https://raw.githubusercontent.com/Azure-Samples/azure-health-data-and-ai-samples/samples/fhir-aad-entra-external/entra-external-arm-template.json -directoryName $directoryName