Skip to content

Commit 6995860

Browse files
authored
Merge pull request #244997 from MicrosoftDocs/main
Publish to live, Friday 4 AM PST, 7/14
2 parents 6f0e6e5 + 1a90fb4 commit 6995860

File tree

80 files changed

+2444
-539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2444
-539
lines changed

.openpublishing.redirection.azure-kubernetes-service.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
"source_path_from_root": "/articles/aks/cilium-enterprise-marketplace.md",
1010
"redirect_url": "/azure/aks/azure-cni-powered-by-cilium",
1111
"redirect_document_id": false
12+
},
13+
{
14+
"source_path_from_root": "/articles/aks/web-app-routing.md",
15+
"redirect_url": "/azure/aks/app-routing",
16+
"redirect_document_id": false
1217
}
1318
]
1419
}

articles/active-directory-b2c/best-practices.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: CelesteDG
99
ms.service: active-directory
1010
ms.workload: identity
1111
ms.topic: conceptual
12-
ms.date: 05/29/2023
12+
ms.date: 07/13/2023
1313
ms.subservice: B2C
1414
---
1515

@@ -40,7 +40,7 @@ Define your application and service architecture, inventory current systems, and
4040
| Move on-premises dependencies to the cloud | To help ensure a resilient solution, consider moving existing application dependencies to the cloud. |
4141
| Migrate existing apps to b2clogin.com | The deprecation of login.microsoftonline.com will go into effect for all Azure AD B2C tenants on 04 December 2020. [Learn more](b2clogin.md). |
4242
| Use Identity Protection and Conditional Access | Use these capabilities for significantly greater control over risky authentications and access policies. Azure AD B2C Premium P2 is required. [Learn more](conditional-access-identity-protection-overview.md). |
43-
|Tenant size | You need to plan with Azure AD B2C tenant size in mind. By default, Azure AD B2C tenant can accommodate 1.25 million objects (user accounts and applications). You can increase this limit to 5.25 million objects by adding a custom domain to your tenant, and verifying it. If you need a bigger tenant size, you need to contact [Support](find-help-open-support-ticket.md).|
43+
|Tenant size | You need to plan with Azure AD B2C tenant size in mind. By default, Azure AD B2C tenant can accommodate 1 million objects (user accounts and applications). You can increase this limit to 5 million objects by adding a custom domain to your tenant, and verifying it. If you need a bigger tenant size, you need to contact [Support](find-help-open-support-ticket.md).|
4444
| Use Identity Protection and Conditional Access | Use these capabilities for greater control over risky authentications and access policies. Azure AD B2C Premium P2 is required. [Learn more](conditional-access-identity-protection-overview.md). |
4545

4646
## Implementation

articles/active-directory-b2c/faq.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
ms.service: active-directory
99
ms.workload: identity
1010
ms.topic: faq
11-
ms.date: 06/23/2023
11+
ms.date: 07/13/2023
1212
ms.author: godonnell
1313
ms.subservice: B2C
1414
ms.custom: "b2c-support"
@@ -59,7 +59,7 @@ sections:
5959
- question: |
6060
How many users can an Azure AD B2C tenant accommodate?
6161
answer: |
62-
- By default, each tenant can accommodate a total of **1.25 million** objects (user accounts and applications), but you can increase this limit to **5.25 million** objects when you [add and verify a custom domain](custom-domain.md). If you want to increase this limit, please contact [Microsoft Support](find-help-open-support-ticket.md). However, if you created your tenant before **September 2022**, this limit doesn't affect you, and your tenant will retain the size allocated to it at creation, that's, **50 million** objects.
62+
- By default, each tenant can accommodate a total of **1 million** objects (user accounts and applications), but you can increase this limit to **5 million** objects when you [add and verify a custom domain](custom-domain.md). If you want to increase this limit, please contact [Microsoft Support](find-help-open-support-ticket.md). However, if you created your tenant before **September 2022**, this limit doesn't affect you, and your tenant will retain the size allocated to it at creation, that's, **50 million** objects.
6363
- question: |
6464
Which social identity providers do you support now? Which ones do you plan to support in the future?
6565
answer: |

articles/active-directory-b2c/tutorial-create-tenant.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: CelesteDG
88
ms.service: active-directory
99
ms.workload: identity
1010
ms.topic: tutorial
11-
ms.date: 06/23/2023
11+
ms.date: 07/13/2023
1212
ms.author: kengaderdus
1313
ms.subservice: B2C
1414
ms.custom: "b2c-support"
@@ -30,7 +30,7 @@ Before you create your Azure AD B2C tenant, you need to take the following consi
3030

3131
- You can create up to **20** tenants per subscription. This limit help protect against threats to your resources, such as denial-of-service attacks, and is enforced in both the Azure portal and the underlying tenant creation API. If you want to increase this limit, please contact [Microsoft Support](find-help-open-support-ticket.md).
3232

33-
- By default, each tenant can accommodate a total of **1.25 million** objects (user accounts and applications), but you can increase this limit to **5.25 million** objects when you add and verify a custom domain. If you want to increase this limit, please contact [Microsoft Support](find-help-open-support-ticket.md). However, if you created your tenant before **September 2022**, this limit doesn't affect you, and your tenant will retain the size allocated to it at creation, that's, **50 million** objects. Learn how to [read your tenant usage](microsoft-graph-operations.md#tenant-usage).
33+
- By default, each tenant can accommodate a total of **1 million** objects (user accounts and applications), but you can increase this limit to **5 million** objects when you add and verify a custom domain. If you want to increase this limit, please contact [Microsoft Support](find-help-open-support-ticket.md). However, if you created your tenant before **September 2022**, this limit doesn't affect you, and your tenant will retain the size allocated to it at creation, that's, **50 million** objects. Learn how to [read your tenant usage](microsoft-graph-operations.md#tenant-usage).
3434

3535
- If you want to reuse a tenant name that you previously tried to delete, but you see the error "Already in use by another directory" when you enter the domain name, you'll need to [follow these steps to fully delete the tenant](./faq.yml?tabs=app-reg-ga#how-do-i-delete-my-azure-ad-b2c-tenant-) before you try again. You require a role of at least *Subscription Administrator*. After deleting the tenant, you might also need to sign out and sign back in before you can reuse the domain name.
3636

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
title: Call an API in a sample .NET daemon application
3+
description: Learn how to configure a sample .NET daemon application that calls an API protected with Azure Active Directory (Azure AD) for customers
4+
services: active-directory
5+
author: SHERMANOUKO
6+
manager: mwongerapk
7+
8+
ms.author: shermanouko
9+
ms.service: active-directory
10+
ms.subservice: ciam
11+
ms.topic: sample
12+
ms.date: 07/13/2023
13+
14+
#Customer intent: As a dev, devops, I want to configure a sample .NET daemon application that calls an API protected by Azure Active Directory (Azure AD) for customers tenant
15+
---
16+
17+
# Call an API in a sample .NET daemon application
18+
19+
This article uses a sample .NET daemon application to show you how a daemon application acquires a token to call a protected web API. Azure Active Directory (Azure AD) for customers protects the Web API.
20+
21+
A daemon application acquires a token on behalf of itself (not on behalf of a user). Users can't interact with a daemon application because it requires its own identity. This type of application requests an access token by using its application identity and presenting its application ID, credential (password or certificate), and application ID URI to Azure AD.
22+
23+
## Prerequisites
24+
25+
- [.NET 7.0](https://dotnet.microsoft.com/download/dotnet/7.0) or later.
26+
27+
- [Visual Studio Code](https://code.visualstudio.com/download) or another code editor.
28+
29+
- Azure AD for customers tenant. If you don't already have one, [sign up for a free trial](https://aka.ms/ciam-free-trial?wt.mc_id=ciamcustomertenantfreetrial_linkclick_content_cnl)</a>.
30+
31+
## Register a daemon application and a web API
32+
33+
In this step, you create the daemon and the web API application registrations, and you specify the scopes of your web API.
34+
35+
### Register a web API application
36+
37+
[!INCLUDE [active-directory-b2c-app-integration-add-user-flow](./includes/register-app/register-api-app.md)]
38+
39+
### Configure application roles
40+
41+
[!INCLUDE [active-directory-b2c-app-integration-add-user-flow](./includes/register-app/add-app-role.md)]
42+
43+
### Configure optional claims
44+
45+
[!INCLUDE [active-directory-b2c-app-integration-add-user-flow](./includes/register-app/add-optional-claims-access.md)]
46+
47+
### Register the daemon application
48+
49+
[!INCLUDE [active-directory-b2c-register-app](./includes/register-app/register-client-app-common.md)]
50+
51+
### Create a client secret
52+
53+
[!INCLUDE [active-directory-b2c-app-integration-add-user-flow](./includes/register-app/add-app-client-secret.md)]
54+
55+
### Grant API permissions to the daemon application
56+
57+
[!INCLUDE [active-directory-b2c-app-integration-add-user-flow](./includes/register-app/grant-api-permissions-app-permissions.md)]
58+
59+
## Clone or download sample daemon application and web API
60+
61+
To get the web application sample code, you can do either of the following tasks:
62+
63+
- [Download the .zip file](https://github.com/Azure-Samples/ms-identity-ciam-dotnet-tutorial/archive/refs/heads/main.zip) or clone the sample web application from GitHub by running the following command:
64+
65+
```console
66+
git clone https://github.com/Azure-Samples/ms-identity-ciam-dotnet-tutorial.git
67+
```
68+
If you choose to download the *.zip* file, extract the sample application file to a folder where the total length of the path is 260 or fewer characters.
69+
70+
## Configure the sample daemon application and API
71+
72+
To use your app registration in the client web application sample:
73+
74+
1. In your code editor, open *ms-identity-ciam-dotnet-tutorial/2-Authorization/3-call-own-api-dotnet-core-daemon/ToDoListClient/appsettings.json* file.
75+
76+
1. Find the placeholder:
77+
78+
- `Enter_the_Application_Id_Here` and replace it with the Application (client) ID of the daemon application you registered earlier.
79+
80+
- `Enter_the_Tenant_Subdomain_Here` and replace it with the Directory (tenant) subdomain. For example, if your tenant primary domain is `contoso.onmicrosoft.com`, use `contoso`. If you don't have your tenant name, learn how to [read your tenant details](how-to-create-customer-tenant-portal.md#get-the-customer-tenant-details).
81+
82+
- `Enter_the_Client_Secret_Here` and replace it with the daemon application secret value you copied earlier.
83+
84+
- `Enter_the_Web_Api_Application_Id_Here` and replace it with the Application (client) ID of the web API you copied earlier.
85+
86+
To use your app registration in the web API sample:
87+
88+
1. In your code editor, open *ms-identity-ciam-dotnet-tutorial/2-Authorization/3-call-own-api-dotnet-core-daemon/ToDoListAPI/appsettings.json* file.
89+
90+
1. Find the placeholder:
91+
92+
- `Enter_the_Application_Id_Here` and replace it with the Application (client) ID of the web API you copied.
93+
94+
- `Enter_the_Tenant_Id_Here` and replace it with the Directory (tenant) ID you copied earlier.
95+
96+
- `Enter_the_Tenant_Subdomain_Here` and replace it with the Directory (tenant) subdomain. For example, if your tenant primary domain is `contoso.onmicrosoft.com`, use `contoso`. If you don't have your tenant name, learn how to [read your tenant details](how-to-create-customer-tenant-portal.md#get-the-customer-tenant-details).
97+
98+
## Run and test sample daemon application and API
99+
100+
1. Open a console window, then run the web API by using the following commands:
101+
102+
```console
103+
cd 2-Authorization\3-call-own-api-dotnet-core-daemon\ToDoListAPI
104+
dotnet run
105+
```
106+
1. Run the daemon client by using the following commands:
107+
108+
```console
109+
cd 2-Authorization\3-call-own-api-dotnet-core-daemon\ToDoListClient
110+
dotnet run
111+
```
112+
113+
If your daemon application and web API successfully run, you should see something similar to the following JSON array in your console window
114+
115+
```bash
116+
Posting a to-do...
117+
Retrieving to-do's from server...
118+
To-do data:
119+
ID: 1
120+
User ID: 41b1e1a8-8e51-4514-8dab-e568afa2826c
121+
Message: Bake bread
122+
Posting a second to-do...
123+
Retrieving to-do's from server...
124+
To-do data:
125+
ID: 1
126+
User ID: 41b1e1a8-8e51-4514-8dab-e568afa2826c
127+
Message: Bake bread
128+
ID: 2
129+
User ID: 41b1e1a8-8e51-4514-8dab-e568afa2826c
130+
Message: Butter bread
131+
Deleting a to-do...
132+
Retrieving to-do's from server...
133+
To-do data:
134+
ID: 2
135+
User ID: 41b1e1a8-8e51-4514-8dab-e568afa2826c
136+
Message: Butter bread
137+
Editing a to-do...
138+
Retrieving to-do's from server...
139+
To-do data:
140+
ID: 2
141+
User ID: 41b1e1a8-8e51-4514-8dab-e568afa2826c
142+
Message: Eat bread
143+
Deleting remaining to-do...
144+
Retrieving to-do's from server...
145+
There are no to-do's in server
146+
```
147+
148+
## How it works
149+
150+
The daemon application use [OAuth2.0 client credentials grant](../../develop/v2-oauth2-client-creds-grant-flow.md) to acquire an access token for itself and not for the user. The access token that the app requests contains the permissions represented as roles. The client credential flow uses this set of permissions in place of user scopes for application tokens. You [exposed these application permissions](#configure-application-roles) in the web API earlier, then [granted them to the daemon app](#grant-api-permissions-to-the-daemon-application). The daemon app in this article uses [Microsoft Authentication Library for .NET](https://github.com/AzureAD/microsoft-authentication-library-for-dotnet) to simplify the process of acquiring a token.
151+
152+
On the API side, the web API must verify that the access token has the required permissions (application permissions). The web API rejects access tokens that don't have the required permissions.
153+
154+
## See also
155+
156+
See the tutorial on how to [build your own .NET daemon app that calls an API](./tutorial-daemon-dotnet-call-api-prepare-tenant.md)

articles/active-directory/external-identities/customers/toc.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ items:
6161
- name: Node.js - call an API
6262
href: sample-daemon-node-call-api.md
6363
displayName: client credentials grant
64+
- name: .NET - call an API
65+
href: sample-daemon-dotnet-call-api.md
6466
- name: Desktop app
6567
items:
6668
- name: Electron - sign in users
@@ -181,17 +183,21 @@ items:
181183
items:
182184
- name: Node.js
183185
items:
184-
- name: Acquire token, call an API
185-
items:
186-
- name: Overview
187-
href: how-to-daemon-node-call-api-overview.md
188-
displayName: client credentials flow
189-
- name: Prepare tenant
190-
href: how-to-daemon-node-call-api-prepare-tenant.md
191-
- name: Prepare app
192-
href: how-to-daemon-node-call-api-prepare-app.md
193-
- name: Acquire access token and call API
194-
href: how-to-daemon-node-call-api-call-api.md
186+
- name: Overview
187+
href: how-to-daemon-node-call-api-overview.md
188+
displayName: client credentials flow
189+
- name: Prepare tenant
190+
href: how-to-daemon-node-call-api-prepare-tenant.md
191+
- name: Prepare app
192+
href: how-to-daemon-node-call-api-prepare-app.md
193+
- name: Acquire access token and call API
194+
href: how-to-daemon-node-call-api-call-api.md
195+
- name: .NET
196+
items:
197+
- name: Prepare tenant
198+
href: tutorial-daemon-dotnet-call-api-prepare-tenant.md
199+
- name: Acquire access token and call API
200+
href: tutorial-daemon-dotnet-call-api-build-app.md
195201
- name: Desktop app
196202
items:
197203
- name: .NET MAUI

0 commit comments

Comments
 (0)