Skip to content

Commit dd24f61

Browse files
committed
update entra ID
1 parent 87b906a commit dd24f61

File tree

2 files changed

+60
-16
lines changed

2 files changed

+60
-16
lines changed

src/content/docs/cloudflare-one/identity/idp-integration/entra-id.mdx

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pcx_content_type: how-to
33
title: Microsoft Entra ID
44
---
55

6-
import { Render } from "~/components";
6+
import { Render, Tabs, TabItem } from "~/components";
77

88
You can integrate Microsoft Entra ID (formerly Azure Active Directory) with Cloudflare Zero Trust and build policies based on user identity and group membership. Users will authenticate to Zero Trust using their Entra ID credentials.
99

@@ -93,6 +93,8 @@ More narrow permissions may be used, however this is the set of permissions that
9393

9494
### 3. Add Entra ID as an identity provider
9595

96+
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
97+
9698
1. In [Zero Trust](https://one.dash.cloudflare.com), go to **Settings** > **Authentication**.
9799

98100
2. Under **Login methods**, select **Add new**.
@@ -114,6 +116,45 @@ More narrow permissions may be used, however this is the set of permissions that
114116

115117
To [test](/cloudflare-one/identity/idp-integration/#test-idps-in-zero-trust) that your connection is working, select **Test**.
116118

119+
</TabItem> <TabItem label="API">
120+
121+
1. [Create an API token](/fundamentals/api/get-started/create-token/) with the following permissions:
122+
| Type | Item | Permission |
123+
| ------- | ---------------- | ---------- |
124+
| Account | Access: Organizations, Identity Providers, and Groups | Edit |
125+
126+
2. Make a `POST` request to the [Identity Providers](/api/resources/zero_trust/subresources/identity_providers/methods/create/) endpoint:
127+
128+
```sh
129+
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/identity_providers \
130+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
131+
--data '{
132+
"name": "Entra ID example",
133+
"type": "azureAD",
134+
"config": {
135+
"client_id": "<your client id>",
136+
"client_secret": "<your client secret>",
137+
"directory_id": "<your azure directory uuid>",
138+
"support_groups": true
139+
}
140+
}'
141+
```
142+
143+
</TabItem> <TabItem label="Terraform">
144+
145+
:::note[Provider versions]
146+
The following example requires Cloudflare provider version `>=4.40.0`.
147+
:::
148+
149+
1. Add the following permission to your [`cloudflare_api_token`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/api_token):
150+
- `Access: Organizations, Identity Providers, and Groups Write`
151+
152+
2. Configure the [`cloudflare_zero_trust_access_identity_provider`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zero_trust_access_identity_provider) resource:
153+
154+
<Render file="access/entra-id-terraform" />
155+
156+
</TabItem> </Tabs>
157+
117158
#### UPN and email
118159

119160
If your organization's UPNs do not match users' email addresses, you must add a custom claim for email. For example, if your organization's email format is `[email protected]` but the UPN is `[email protected]`, you must create an email claim if you are configuring email-based policies.
@@ -264,18 +305,3 @@ You can require users to re-enter their credentials into Entra ID whenever they
264305
"scim_base_url": "https://<TEAM_NAME>.cloudflareaccess.com/populations/f174e90a-fafe-4643-bbbc-4a0ed4fc8415/scim/v2"
265306
}'
266307
```
267-
268-
## Example API Configuration
269-
270-
```json
271-
{
272-
"config": {
273-
"client_id": "<your client id>",
274-
"client_secret": "<your client secret>",
275-
"directory_id": "<your azure directory uuid>",
276-
"support_groups": true
277-
},
278-
"type": "azureAD",
279-
"name": "my example idp"
280-
}
281-
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
{}
3+
---
4+
5+
6+
```tf
7+
resource "cloudflare_zero_trust_access_identity_provider" "microsoft_entra_id" {
8+
account_id = var.cloudflare_account_id
9+
name = "Entra ID example"
10+
type = "azureAD"
11+
config {
12+
client_id = var.entra_id_client_id
13+
client_secret = var.entra_id_client_secret
14+
directory_id = var.entra_id_directory_id
15+
support_groups = true
16+
}
17+
}
18+
```

0 commit comments

Comments
 (0)