Skip to content

Commit 610f341

Browse files
committed
edits per content mentor
1 parent 399d251 commit 610f341

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

articles/healthcare-apis/get-access-token.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
---
22
title: Get an access token to use the FHIR service or the DICOM service
3-
description: Learn how to get an access token for the FHIR service or the DICOM service.
3+
description: Learn how to get an access token to access the FHIR service or the DICOM service using Azure CLI or Powershell.
44
services: healthcare-apis
55
author: chachachachami
66
ms.service: azure-health-data-services
77
ms.topic: how-to
8-
ms.date: 03/16/2036
8+
ms.date: 03/30/2026
99
ms.author: chrupa
10+
ms.reviewer: v-catheribun
1011
ms.custom: devx-track-azurepowershell, devx-track-azurecli
1112
ms.devlang: azurecli
1213
---
1314

1415
# Get an access token by using Azure CLI or Azure PowerShell
1516

16-
To use the FHIR® service or the DICOM® service, you need an access token that verifies your identity and permissions to the server. You can obtain an access token by using [PowerShell](/powershell/scripting/overview) or the [Azure Command-Line Interface (CLI)](/cli/azure/what-is-azure-cli), which are tools for creating and managing Azure resources.
17+
To use the FHIR® service or the DICOM® service, you need an access token that verifies your identity and permissions to the service. You can get an access token by using [PowerShell](/powershell/scripting/overview) or the [Azure Command-Line Interface (CLI)](/cli/azure/what-is-azure-cli). These tools help you create and manage Azure resources.
1718

18-
To access the FHIR service or the DICOM service, you must grant permissions to users and applications through [role assignments](configure-azure-rbac.md) from the Azure portal or by using [scripts](configure-azure-rbac-using-scripts.md).
19+
Manage the permissions for users and applications to access FHIR or the DICOM services through [role assignments](configure-azure-rbac.md) from the Azure portal or by using [scripts](configure-azure-rbac-using-scripts.md).
1920

2021
## Get an access token for the FHIR service
2122

22-
The FHIR service uses a specific `resource` or `Audience` with a URI equal to the URI of the FHIR server `https://<workspacename-fhirservicename>.fhir.azurehealthcareapis.com`. The following example obtains a token and uses it to get a list of patients. To run the example, you need at least the FHIR Data Reader role assignment. Replace the `<placeholder>` with the service URL for your FHIR service.
23+
The FHIR service uses a specific `resource` or `Audience` with a URI equal to the URI of the FHIR server `https://<workspacename-fhirservicename>.fhir.azurehealthcareapis.com`. The following example gets a token and uses it to get a list of patients. To run the example, you need at least the FHIR Data Reader role assignment. Replace the `<placeholder>` with the service URL for your FHIR service.
2324

2425
### [Azure CLI](#tab/azure-cli)
2526

@@ -40,11 +41,11 @@ Invoke-WebRequest -Method GET -Headers $headers -Uri 'https://<workspacename-fhi
4041

4142
## Get an access token for the DICOM service
4243

43-
The DICOM service uses the same `resource` or `Audience` with a URI equal to `https://dicom.healthcareapis.azure.com` to obtain an access token. The following example obtains an access token and uses it to get the service logs. To run the example, you need at least the DICOM Data Reader role assignment. Replace the `<placeholder>` with the service URL for your DICOM service.
44+
The DICOM service uses the same `resource` or `Audience` with a URI equal to `https://dicom.healthcareapis.azure.com` to get an access token. The following example gets an access token and uses it to get the service logs. To run the example, you need at least the DICOM Data Reader role assignment. Replace the `<placeholder>` with the service URL for your DICOM service.
4445

4546
### [Azure CLI](#tab/azure-cli)
4647

47-
```Azure CLICopy
48+
```azurecli-interactive
4849
token=$(az account get-access-token --resource=https://dicom.healthcareapis.azure.com --query accessToken --output tsv)
4950
curl -X GET --header "Authorization: Bearer $token" https://<workspacename-dicomservicename>.dicom.azurehealthcareapis.com/v<version of REST API>/changefeed
5051
```

0 commit comments

Comments
 (0)