Skip to content

Commit 64a9d77

Browse files
authored
Merge pull request #269824 from shellyhaverkamp/smh-fhir-objids
Find identity obj IDs in Azure API for FHIR
2 parents 43af97e + 15bbd95 commit 64a9d77

File tree

1 file changed

+35
-25
lines changed

1 file changed

+35
-25
lines changed
Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,86 @@
11
---
2-
title: Find identity object IDs for authentication - Azure API for FHIR
3-
description: This article explains how to locate the identity object IDs needed to configure authentication for Azure API for FHIR
2+
title: Find identity object IDs for authentication in Azure API for FHIR
3+
description: This article explains how to locate the identity object IDs needed to configure authentication for Azure API for FHIR.
44
services: healthcare-apis
55
author: expekesheth
66
ms.service: healthcare-apis
77
ms.subservice: fhir
88
ms.custom: has-azure-ad-ps-ref
99
ms.topic: conceptual
10-
ms.date: 9/27/2023
10+
ms.date: 3/21/2024
1111
ms.author: kesheth
1212
---
1313

14-
# Find identity object IDs for authentication configuration for Azure API for FHIR
14+
# Find identity object IDs for authentication configuration in Azure API for FHIR
1515

1616
[!INCLUDE [retirement banner](../includes/healthcare-apis-azure-api-fhir-retirement.md)]
1717

18-
In this article, you'll learn how to find identity object IDs needed when configuring the Azure API for FHIR to [use an external or secondary Active Directory tenant](configure-local-rbac.md) for data plane.
18+
In this article, learn how to find the identity object IDs needed to configure the Azure API for FHIR service to [use an external or secondary Active Directory tenant](configure-local-rbac.md) for data plane.
1919

2020
## Find user object ID
2121

22-
If you have a user with user name `[email protected]`, you can locate the users `ObjectId` using the following PowerShell command:
22+
If you have a user with user name `[email protected]`, you can locate the user's `ObjectId` by using a Microsoft Graph PowerShell command or the Azure Command-Line Interface (CLI).
2323

24-
```azurepowershell-interactive
25-
$(Get-AzureADUser -Filter "UserPrincipalName eq '[email protected]'").ObjectId
24+
#### [PowerShell](#tab/powershell)
25+
26+
```powershell
27+
$(Get-MgUser -Filter "UserPrincipalName eq '[email protected]'").Id
2628
```
2729

28-
or you can use the Azure CLI:
30+
#### [Azure CLI](#tab/command-line)
2931

3032
```azurecli-interactive
3133
az ad user show --id [email protected] --query id --out tsv
3234
```
3335

36+
---
37+
3438
## Find service principal object ID
3539

36-
Suppose you've registered a [service client app](register-service-azure-ad-client-app.md) and you would like to allow this service client to access the Azure API for FHIR, you can find the object ID for the client service principal with the following PowerShell command:
40+
Suppose you registered a [service client app](register-service-azure-ad-client-app.md) and you want to allow this service client to access the Azure API for FHIR. Find the object ID for the client service principal with a Microsoft Graph PowerShell command or the Azure CLI.
3741

38-
```azurepowershell-interactive
39-
$(Get-AzureADServicePrincipal -Filter "AppId eq 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'").ObjectId
42+
#### [PowerShell](#tab/powershell)
43+
44+
```powershell
45+
$(Get-MgServicePrincipal -Filter "AppId eq 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'").Id
4046
```
4147

42-
where `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX` is the service client application ID. Alternatively, you can use the `DisplayName` of the service client:
48+
Where `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX` is the service client application ID. Alternatively, you can use the `DisplayName` of the service client:
4349

44-
```azurepowershell-interactive
45-
$(Get-AzureADServicePrincipal -Filter "DisplayName eq 'testapp'").ObjectId
50+
```powershell
51+
$(Get-MgServicePrincipal -Filter "DisplayName eq 'testapp'").Id
4652
```
4753

48-
If you're using the Azure CLI, you can use:
54+
#### [Azure CLI](#tab/command-line)
4955

5056
```azurecli-interactive
5157
az ad sp show --id XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX --query id --out tsv
5258
```
5359

60+
---
61+
5462
## Find a security group object ID
5563

56-
If you would like to locate the object ID of a security group, you can use the following PowerShell command:
64+
If you would like to locate the object ID of a security group, you can use a Microsoft Graph PowerShell command or the Azure CLI.
65+
66+
#### [PowerShell](#tab/powershell)
5767

58-
```azurepowershell-interactive
59-
$(Get-AzureADGroup -Filter "DisplayName eq 'mygroup'").ObjectId
68+
```powershell
69+
$(Get-MgGroup -Filter "DisplayName eq 'mygroup'").Id
6070
```
71+
6172
Where `mygroup` is the name of the group you're interested in.
6273

63-
If you're using the Azure CLI, you can use:
74+
#### [Azure CLI](#tab/command-line)
6475

6576
```azurecli-interactive
6677
az ad group show --group "mygroup" --query id --out tsv
6778
```
6879

80+
---
81+
6982
## Next steps
7083

71-
In this article, you've learned how to find identity object IDs needed to configure the Azure API for FHIR to use an external or secondary Microsoft Entra tenant. Next read about how to use the object IDs to configure local RBAC settings:
72-
73-
>[!div class="nextstepaction"]
74-
>[Configure local RBAC settings](configure-local-rbac.md)
84+
[Configure local RBAC settings](configure-local-rbac.md)
7585

76-
FHIR® is a registered trademark of [HL7](https://hl7.org/fhir/) and is used with the permission of HL7.
86+
[!INCLUDE [FHIR trademark statement](../includes/healthcare-apis-fhir-trademark.md)]

0 commit comments

Comments
 (0)