You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: This article describes the different ways to access Azure Health Data Services in your applications using tools and programming languages.
3
+
description: Learn how to access the FHIR, DICOM, and MedTech services in Azure Health Data Services by using Postman, cURL, REST Client, and programming languages like Python and C# for efficient data management.
4
4
services: healthcare-apis
5
-
author: chachachachami
5
+
author: msjasteppe
6
6
ms.service: healthcare-apis
7
7
ms.subservice: fhir
8
8
ms.topic: conceptual
9
-
ms.date: 06/06/2022
10
-
ms.author: chrupa
9
+
ms.date: 04/29/2024
10
+
ms.author: jasteppe
11
11
---
12
12
13
13
# Access Azure Health Data Services
14
14
15
-
In this article, you'll learn about the different ways to access Azure Health Data Services in your applications. After you've provisioned a FHIR service, DICOM service, or MedTech service, you can then access them in your applications using tools like Postman, cURL, REST Client in Visual Studio Code, and with programming languages such as Python and C#.
15
+
After you deploy a FHIR® service, DICOM® service, or MedTech service, you can then access it in your applications by using tools like Postman, cURL, REST Client in Visual Studio Code, or with programming languages such as Python or C#.
16
16
17
17
## Access the FHIR service
18
18
19
-
-[Access the FHIR service using Postman](././fhir/use-postman.md)
20
-
-[Access the FHIR service using cURL](././fhir/using-curl.md)
21
-
-[Access the FHIR service using REST Client](././fhir/using-rest-client.md)
19
+
-[Access the FHIR service by using Postman](././fhir/use-postman.md)
20
+
-[Access the FHIR service by using cURL](././fhir/using-curl.md)
21
+
-[Access the FHIR service by using REST Client](././fhir/using-rest-client.md)
22
22
23
23
## Access the DICOM service
24
24
25
-
-[Access the DICOM service using Python](dicom/dicomweb-standard-apis-python.md)
26
-
-[Access the DICOM service using cURL](dicom/dicomweb-standard-apis-curl.md)
27
-
-[Access the DICOM service using C#](dicom/dicomweb-standard-apis-c-sharp.md)
25
+
-[Access the DICOM service by using Python](dicom/dicomweb-standard-apis-python.md)
26
+
-[Access the DICOM service by using cURL](dicom/dicomweb-standard-apis-curl.md)
27
+
-[Access the DICOM service by using C#](dicom/dicomweb-standard-apis-c-sharp.md)
28
28
29
-
## Access MedTech service
29
+
## Access the MedTech service
30
30
31
-
The MedTech service works with the IoT Hub and Event Hubs in your subscription to receive message data, and the FHIR service to persist the data.
31
+
The MedTech service works with the IoT Hub and Event Hubs to receive message data, and works with the FHIR service to persist the data.
32
32
33
33
-[Receive device data through Azure IoT Hub](iot/device-data-through-iot-hub.md)
34
-
-[Access the FHIR service using Postman](fhir/use-postman.md)
35
-
-[Access the FHIR service using cURL](fhir/using-curl.md)
36
-
-[Access the FHIR service using REST Client](fhir/using-rest-client.md)
34
+
-[Access the FHIR service by using Postman](fhir/use-postman.md)
35
+
-[Access the FHIR service by using cURL](fhir/using-curl.md)
36
+
-[Access the FHIR service by using REST Client](fhir/using-rest-client.md)
37
37
38
38
39
39
## Next steps
40
40
41
-
In this document, you learned about the tools and programming languages that you can use to access Azure Health Data Services in your applications. To learn how to deploy an instance of Azure Health Data Services using the Azure portal, see
41
+
[Deploy Azure Health Data Services workspace using the Azure portal](healthcare-apis-quickstart.md)
42
42
43
-
>[!div class="nextstepaction"]
44
-
>[Deploy Azure Health Data Services workspace using the Azure portal](healthcare-apis-quickstart.md)
45
-
46
-
FHIR® is a registered trademark of [HL7](https://hl7.org/fhir/) and is used with the permission of HL7.
43
+
[!INCLUDE [FHIR and DICOM trademark statements](./includes/healthcare-apis-fhir-dicom-trademark.md)]
description: This article provides an overview of the authentication and authorization of Azure Health Data Services.
2
+
title: Authentication and authorization in Azure Health Data Services
3
+
description: Learn how to manage access to Azure Health Data Services by using Microsoft Entra ID, assign application roles, and secure your data with OAuth 2.0 protocols and managed identities.
4
4
services: healthcare-apis
5
-
author: chachachachami
5
+
author: EXPEkesheth
6
6
ms.service: healthcare-apis
7
7
ms.topic: overview
8
-
ms.date: 06/06/2022
9
-
ms.author: chrupa
8
+
ms.date: 04/30/2024
9
+
ms.author: kesheth
10
10
---
11
11
12
12
# Authentication and authorization for Azure Health Data Services
@@ -15,39 +15,37 @@ ms.author: chrupa
15
15
16
16
Azure Health Data Services is a collection of secured managed services using [Microsoft Entra ID](../active-directory/index.yml), a global identity provider that supports [OAuth 2.0](https://oauth.net/2/).
17
17
18
-
For Azure Health Data Services to access Azure resources, such as storage accounts and event hubs, you must **enable the system managed identity**, and **grant proper permissions** to the managed identity. For more information, see [Azure managed identities](../active-directory/managed-identities-azure-resources/overview.md).
19
-
20
-
Azure Health Data Services doesn't support other identity providers. However, you can use their own identity provider to secure applications, and enable them to interact with the Health Data Services by managing client applications and user data access controls.
18
+
For Azure Health Data Services to access Azure resources, such as storage accounts and event hubs, you need to enable the system managed identity and grant proper permissions to the managed identity. For more information, see [Azure managed identities](../active-directory/managed-identities-azure-resources/overview.md).
21
19
22
20
The client applications are registered in the Microsoft Entra ID and can be used to access the Azure Health Data Services. User data access controls are done in the applications or services that implement business logic.
23
21
24
22
### Application roles
25
23
26
-
Authenticated users and client applications of the Azure Health Data Services must be granted with proper application roles.
24
+
Authenticated users and client applications of the Azure Health Data Services must be assigned to the proper application role.
27
25
28
-
FHIR service of Azure Health Data Services provides the following roles:
26
+
The FHIR® service in Azure Health Data Services provides these roles:
29
27
30
-
***FHIR Data Reader**: Can read (and search) FHIR data.
31
-
***FHIR Data Writer**: Can read, write, and soft delete FHIR data.
32
-
***FHIR Data Exporter**: Can read and export ($export operator) data.
33
-
***FHIR Data Importer**: Can read and import ($import operator) data.
34
-
***FHIR Data Contributor**: Can perform all data plane operations.
35
-
***FHIR Data Converter**: Can use the converter to perform data conversion.
36
-
***FHIR SMART User**: Role allows user to read and write FHIR data according to the[SMART IG V1.0.0 specifications](http://hl7.org/fhir/smart-app-launch/1.0.0/).
28
+
***FHIR Data Reader**: Read and search FHIR data.
29
+
***FHIR Data Writer**: Read, write, and soft delete FHIR data.
30
+
***FHIR Data Exporter**: Read and export ($export operator) data.
31
+
***FHIR Data Importer**: Read and import ($import operator) data.
32
+
***FHIR Data Contributor**: Perform all data plane operations.
33
+
***FHIR Data Converter**: Use the converter to perform data conversion.
34
+
***FHIR SMART User**: Allows user to read and write FHIR data according to [SMART IG V1.0.0 specifications](http://hl7.org/fhir/smart-app-launch/1.0.0/).
37
35
38
-
DICOM service of Azure Health Data Services provides the following roles:
36
+
The DICOM® service in Azure Health Data Services provides the following roles:
39
37
40
-
***DICOM Data Owner**: Can read, write, and delete DICOM data.
41
-
***DICOM Data Read**: Can read DICOM data.
38
+
***DICOM Data Owner**: Read, write, and delete DICOM data.
39
+
***DICOM Data Read**: Read DICOM data.
42
40
43
-
The MedTech service doesn't require application roles, but it does rely on the "Azure Event Hubs Data Receiver" to retrieve data stored in the event hub of the customer's subscription.
41
+
The MedTech service doesn't require application roles, but it does rely on **Azure Event Hubs Data Receiver** to retrieve data stored in the event hub of your organization's subscription.
44
42
45
43
## Authorization
46
44
47
-
After being granted with proper application roles, the authenticated users and client applications can access Azure Health Data Services by obtaining a **valid access token** issued by Microsoft Entra ID, and perform specific operations defined by the application roles.
45
+
After being granted with proper application roles, the authenticated users and client applications can access Azure Health Data Services by obtaining a valid access token issued by Microsoft Entra ID, and perform specific operations defined by the application roles.
48
46
49
-
* For FHIR service, the access token is specific to the service or resource.
50
-
* For DICOM service, the access token is granted to the `dicom.healthcareapis.azure.com` resource, not a specific service.
47
+
* For the FHIR service, the access token is specific to the service or resource.
48
+
* For the DICOM service, the access token is granted to the `dicom.healthcareapis.azure.com` resource, not a specific service.
51
49
* For MedTech service, the access token isn’t required because it isn’t exposed to the users or client applications.
52
50
53
51
### Steps for authorization
@@ -58,13 +56,13 @@ Here's how an access token for Azure Health Data Services is obtained using **au
58
56
59
57
1.**The client sends a request to the Microsoft Entra authorization endpoint.** Microsoft Entra ID redirects the client to a sign-in page where the user authenticates using appropriate credentials (for example: username and password, or a two-factor authentication). **Upon successful authentication, an authorization code is returned to the client.** Microsoft Entra-only allows this authorization code to be returned to a registered reply URL configured in the client application registration.
60
58
61
-
2.**The client application exchanges the authorization code for an access token at the Microsoft Entra token endpoint.** When the client application requests a token, the application may have to provide a client secret (which you can add during application registration).
59
+
2.**The client application exchanges the authorization code for an access token at the Microsoft Entra token endpoint.** When the client application requests a token, the application might have to provide a client secret (which you can add during application registration).
62
60
63
-
3.**The client makes a request to the Azure Health Data Services**, for example, a `GET` request to search all patients in the FHIR service. The request **includes the access token in an `HTTP` request header**, for example, **`Authorization: Bearer xxx`**.
61
+
3.**The client makes a request to the Azure Health Data Services**, for example, a `GET` request to search all patients in the FHIR service. The request includes the access token in an `HTTP` request header, for example, `Authorization: Bearer xxx`.
64
62
65
63
4.**Azure Health Data Services validates that the token contains appropriate claims (properties in the token).** If it’s valid, it completes the request and returns data to the client.
66
64
67
-
In the **client credentials flow**, permissions are granted directly to the application itself. When the application presents a token to a resource, the resource enforces that the application itself has authorization to perform an action since there’s no user involved in the authentication. Therefore, it’s different from the **authorization code flow** in the following ways:
65
+
In the **client credentials flow**, permissions are granted directly to the application itself. When the application presents a token to a resource, the resource enforces that the application itself has authorization to perform an action since there’s no user involved in the authentication. Therefore, it’s different from the authorization code flow in these ways:
68
66
69
67
- The user or the client doesn’t need to sign in interactively.
70
68
- The authorization code isn’t required.
@@ -80,7 +78,7 @@ Azure Health Data Services typically expects a [JSON Web Token](https://en.wikip
80
78
* Payload (the claims)
81
79
* Signature, as shown in the image. For more information, see [Azure access tokens](../active-directory/develop/configurable-token-lifetimes.md).
82
80
83
-
[](media/azure-access-token.png#lightbox)
81
+
:::image type="content" source="media/azure-access-token.png" alt-text="Screenshot showing web token signature":::
84
82
85
83
Use online tools such as [https://jwt.ms](https://jwt.ms/) to view the token content. For example, you can view the claims details.
86
84
@@ -90,14 +88,14 @@ Use online tools such as [https://jwt.ms](https://jwt.ms/) to view the token con
90
88
|iss |https://sts.windows.net/{tenantid}/|Identifies the security token service (STS) that constructs and returns the token, and the Microsoft Entra tenant in which the user was authenticated. If the token was issued by the v2.0 endpoint, the URI ends in `/v2.0`. The GUID that indicates that the user is a consumer user from a Microsoft account is `9188040d-6c67-4c5b-b112-36a304b66dad`. Your app should use the GUID portion of the claim to restrict the set of tenants that can sign in to the app, if it's applicable.|
91
89
|iat |(time stamp) |"Issued At" indicates when the authentication for this token occurred.|
92
90
|nbf |(time stamp) |The "nbf" (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing.|
93
-
|exp |(time stamp) |The "exp" (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing. Note that a resource may reject the token before this time, for example if a change in authentication is required, or a token revocation has been detected.|
91
+
|exp |(time stamp) |The "exp" (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing. A resource might reject the token before this time, for example if a change in authentication is required, or a token revocation is detected.|
94
92
|aio |E2ZgYxxx |An internal claim used by Microsoft Entra ID to record data for token reuse. Should be ignored.|
95
93
|appid |e97e1b8c-xxx |The application ID of the client using the token. The application can act as itself or on behalf of a user. The application ID typically represents an application object, but it can also represent a service principal object in Microsoft Entra ID.|
96
94
|appidacr |1 |Indicates how the client was authenticated. For a public client, the value is 0. If client ID and client secret are used, the value is 1. If a client certificate was used for authentication, the value is 2.|
97
-
|idp |https://sts.windows.net/{tenantid}/|Records the identity provider that authenticated the subject of the token. This value is identical to the value of the Issuer claim unless the user account isn’t in the same tenant as the issuer - guests, for instance. If the claim isn’t present, it means that the value of iss can be used instead. For personal accounts being used in an organizational context (for instance, a personal account invited to a Microsoft Entra tenant), the idp claim may be 'live.com' or an STS URI containing the Microsoft account tenant 9188040d-6c67-4c5b-b112-36a304b66dad.|
95
+
|idp |https://sts.windows.net/{tenantid}/|Records the identity provider that authenticated the subject of the token. This value is identical to the value of the Issuer claim unless the user account isn’t in the same tenant as the issuer - guests, for instance. If the claim isn’t present, it means that the value of iss can be used instead. For personal accounts being used in an organizational context (for instance, a personal account invited to a Microsoft Entra tenant), the idp claim might be 'live.com' or an STS URI containing the Microsoft account tenant 9188040d-6c67-4c5b-b112-36a304b66dad.|
98
96
|oid |For example, tenantid |The immutable identifier for an object in the Microsoft identity system, in this case, a user account. This ID uniquely identifies the user across applications - two different applications signing in the same user receives the same value in the oid claim. The Microsoft Graph returns this ID as the ID property for a given user account. Because the oid allows multiple apps to correlate users, the profile scope is required to receive this claim. Note: If a single user exists in multiple tenants, the user contains a different object ID in each tenant - they’re considered different accounts, even though the user logs into each account with the same credentials.|
99
97
|rh |0.ARoxxx |An internal claim used by Azure to revalidate tokens. It should be ignored.|
100
-
|sub |For example, tenantid |The principle about which the token asserts information, such as the user of an app. This value is immutable and can’t be reassigned or reused. The subject is a pairwise identifier - it’s unique to a particular application ID. Therefore, if a single user signs into two different apps using two different client IDs, those apps receive two different values for the subject claim. You may or may not desire this result depending on your architecture and privacy requirements.|
98
+
|sub |For example, tenantid |The principal about which the token asserts information, such as the user of an app. This value is immutable and can’t be reassigned or reused. The subject is a pairwise identifier - it’s unique to a particular application ID. Therefore, if a single user signs into two different apps using two different client IDs, those apps receive two different values for the subject claim. You might not want this result depending on your architecture and privacy requirements.|
101
99
|tid |For example, tenantid |A GUID that represents the Microsoft Entra tenant that the user is from. For work and school accounts, the GUID is the immutable tenant ID of the organization that the user belongs to. For personal accounts, the value is 9188040d-6c67-4c5b-b112-36a304b66dad. The profile scope is required in order to receive this claim.
102
100
|uti |bY5glsxxx |An internal claim used by Azure to revalidate tokens. It should be ignored.|
103
101
|ver |1 |Indicates the version of the token.|
@@ -116,9 +114,8 @@ When you create a new service of Azure Health Data Services, your data is encryp
116
114
117
115
## Next steps
118
116
119
-
In this document, you learned the authentication and authorization of Azure Health Data Services. To learn how to deploy an instance of Azure Health Data Services, see
117
+
[Deploy Azure Health Data Services workspace by using the Azure portal](healthcare-apis-quickstart.md)
120
118
121
-
>[!div class="nextstepaction"]
122
-
>[Deploy Azure Health Data Services workspace using the Azure portal](healthcare-apis-quickstart.md)
119
+
[Use Azure Active Directory B2C to grant access to the FHIR service](fhir/azure-ad-b2c-setup.md)
123
120
124
-
FHIR® is a registered trademark of [HL7](https://hl7.org/fhir/) and is used with the permission of HL7.
121
+
[!INCLUDE [FHIR and DICOM trademark statement](./includes/healthcare-apis-fhir-dicom-trademark.md)]
0 commit comments