Skip to content

Commit 9ffbc6d

Browse files
authored
Merge pull request #234749 from MicrosoftDocs/main
4/17 PM Publish
2 parents 1210aaf + 519a216 commit 9ffbc6d

File tree

175 files changed

+2920
-1875
lines changed

Some content is hidden

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

175 files changed

+2920
-1875
lines changed

.openpublishing.redirection.azure-monitor.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"redirections": [
3-
{
3+
{
4+
"source_path_from_root": "/articles/azure-monitor/snapshot-debugger/snapshot-collector-release-notes.md",
5+
"redirect_url": "/azure/azure-monitor/snapshot-debugger/snapshot-debugger#release-notes-for-microsoftapplicationinsightssnapshotcollector",
6+
"redirect_document_id": false
7+
},
8+
{
49
"source_path_from_root": "/articles/azure-monitor/best-practices.md",
510
"redirect_url": "/azure/azure-monitor/getting-started",
611
"redirect_document_id": false

articles/active-directory/app-provisioning/plan-cloud-hr-provision.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ ms.service: active-directory
88
ms.subservice: app-provisioning
99
ms.topic: conceptual
1010
ms.workload: identity
11-
ms.date: 10/20/2022
11+
ms.date: 04/17/2023
1212
ms.author: kenwith
1313
ms.reviewer: arvinh
1414
---
1515

1616
# Plan cloud HR application to Azure Active Directory user provisioning
1717

18-
Historically, IT staff have relied on manual methods to create, update, and delete employees. They've used methods such as uploading CSV files or custom scripts to sync employee data. These provisioning processes are error prone, insecure, and hard to manage.
18+
Historically, IT staff has relied on manual methods to create, update, and delete employees. They've used methods such as uploading CSV files or custom scripts to sync employee data. These provisioning processes are error prone, insecure, and hard to manage.
1919

2020
To manage the identity lifecycles of employees, vendors, or contingent workers, [Azure Active Directory (Azure AD) user provisioning service](../app-provisioning/user-provisioning.md) offers integration with cloud-based human resources (HR) applications. Examples of applications include Workday or SuccessFactors.
2121

@@ -36,7 +36,7 @@ The following video provides guidance on planning your HR-driven provisioning in
3636

3737
The Azure AD user provisioning service enables automation of the following HR-based identity lifecycle management scenarios:
3838

39-
- **New employee hiring:** When a new employee is added to the cloud HR app, a user account is automatically created in Active Directory and Azure AD with the option to write back the email address and username attributes to the cloud HR app.
39+
- **New employee hiring:** Adding an employee to the cloud HR app automatically creates a user in Active Directory and Azure AD. Adding a user account includes the option to write back the email address and username attributes to the cloud HR app.
4040
- **Employee attribute and profile updates:** When an employee record such as name, title, or manager is updated in the cloud HR app, their user account is automatically updated in Active Directory and Azure AD.
4141
- **Employee terminations:** When an employee is terminated in the cloud HR app, their user account is automatically disabled in Active Directory and Azure AD.
4242
- **Employee rehires:** When an employee is rehired in the cloud HR app, their old account can be automatically reactivated or reprovisioned to Active Directory and Azure AD.
@@ -48,7 +48,7 @@ The cloud HR app integration with Azure AD user provisioning is ideally suited f
4848
- Want a prebuilt, cloud-based solution for cloud HR user provisioning.
4949
- Require direct user provisioning from the cloud HR app to Active Directory or Azure AD.
5050
- Require users to be provisioned by using data obtained from the cloud HR app.
51-
- Require joining, moving, and leaving users to be synced to one or more Active Directory forests, domains, and OUs based only on change information detected in the cloud HR app.
51+
- Syncing users who are joining, moving, and leaving. The sync happens between one or more Active Directory forests, domains, and OUs based only on change information detected in the cloud HR app.
5252
- Use Microsoft 365 for email.
5353

5454
## Learn
@@ -68,15 +68,15 @@ This article uses the following terms:
6868
This capability of HR-driven IT provisioning offers the following significant business benefits:
6969

7070
- **Increase productivity:** You can now automate the assignment of user accounts and Microsoft 365 licenses and provide access to key groups. Automating assignments gives new hires immediate access to their job tools and increases productivity.
71-
- **Manage risk:** You can increase security by automating changes based on employee status or group memberships with data flowing in from the cloud HR app. Automating changes ensures that user identities and access to key apps update automatically when users transition or leave the organization.
71+
- **Manage risk:** Automate changes based on employee status or group membership to increase security. This automation ensures that user identities and access to key apps update automatically. For example, an update in the HR app when a user transitions or leaves the organization flows in automatically.
7272
- **Address compliance and governance:** Azure AD supports native audit logs for user provisioning requests performed by apps of both source and target systems. With auditing, you can track who has access to the apps from a single screen.
7373
- **Manage cost:** Automatic provisioning reduces costs by avoiding inefficiencies and human error associated with manual provisioning. It reduces the need for custom-developed user provisioning solutions built over time by using legacy and outdated platforms.
7474

7575
### Licensing
7676

7777
To configure the cloud HR app to Azure AD user provisioning integration, you require a valid [Azure AD Premium license](https://www.microsoft.com/security/business/identity-access-management/azure-ad-pricing) and a license for the cloud HR app, such as Workday or SuccessFactors.
7878

79-
You also need a valid Azure AD Premium P1 or higher subscription license for every user that will be sourced from the cloud HR app and provisioned to either Active Directory or Azure AD. Any improper number of licenses owned in the cloud HR app might lead to errors during user provisioning.
79+
You also need a valid Azure AD Premium P1 or higher subscription license for every user that is sourced from the cloud HR app and provisioned to either Active Directory or Azure AD. Any improper number of licenses owned in the cloud HR app might lead to errors during user provisioning.
8080

8181
### Prerequisites
8282

@@ -132,7 +132,7 @@ Include a representative from the HR organization who can provide inputs on exis
132132

133133
### Plan communications
134134

135-
Communication is critical to the success of any new service. Proactively communicate with your users about when and how their experience will change. Let them know how to gain support if they experience issues.
135+
Communication is critical to the success of any new service. Proactively communicate with your users about when and how their experience is changing. Let them know how to gain support if they experience issues.
136136

137137
### Plan a pilot
138138

@@ -231,7 +231,7 @@ This is the most common deployment topology. Use this topology, if you need to p
231231

232232
### Deployment topology 2: Separate apps to provision distinct user sets from Cloud HR to single on-premises Active Directory domain
233233

234-
This topology supports business requirements where attribute mapping and provisioning logic differs based on user type (employee/contractor), user location or user's business unit. You can also use this topology to delegate the administration and maintenance of inbound user provisioning based on division or country.
234+
This topology supports business requirements where attribute mapping and provisioning logic differ based on user type (employee/contractor), user location or user's business unit. You can also use this topology to delegate the administration and maintenance of inbound user provisioning based on division or country.
235235

236236
:::image type="content" source="media/plan-cloud-hr-provision/topology-2-separate-apps-with-single-ad-domain.png" alt-text="Screenshot of separate apps to provision users from Cloud HR to single AD domain" lightbox="media/plan-cloud-hr-provision/topology-2-separate-apps-with-single-ad-domain.png":::
237237

@@ -419,13 +419,13 @@ For example, if you want to create users in OU based on the HR attribute **Munic
419419
Switch([Municipality], "OU=Default,OU=Users,DC=contoso,DC=com", "Dallas", "OU=Dallas,OU=Users,DC=contoso,DC=com", "Austin", "OU=Austin,OU=Users,DC=contoso,DC=com", "Seattle", "OU=Seattle,OU=Users,DC=contoso,DC=com", "London", "OU=London,OU=Users,DC=contoso,DC=com")
420420
`
421421

422-
With this expression, if the Municipality value is Dallas, Austin, Seattle, or London, the user account will be created in the corresponding OU. If there's no match, then the account is created in the default OU.
422+
With this expression, if the Municipality value is Dallas, Austin, Seattle, or London, the user account is created in the corresponding OU. If there's no match, then the account is created in the default OU.
423423

424424
## Plan for password delivery of new user accounts
425425

426426
When you initiate the Joiners process, you need to set and deliver a temporary password of new user accounts. With cloud HR to Azure AD user provisioning, you can roll out the Azure AD [self-service password reset](../authentication/tutorial-enable-sspr.md) (SSPR) capability for the user on day one.
427427

428-
SSPR is a simple means for IT administrators to enable users to reset their passwords or unlock their accounts. You can provision the **Mobile Number** attribute from the cloud HR app to Active Directory and sync it with Azure AD. After the **Mobile Number** attribute is in Azure AD, you can enable SSPR for the user's account. Then on day one, the new user can use the registered and verified mobile number for authentication. Refer to the [SSPR documentation](../authentication/howto-sspr-authenticationdata.md) for details on how to pre-populate authentication contact information.
428+
SSPR is a simple means for IT administrators to enable users to reset their passwords or unlock their accounts. You can provision the **Mobile Number** attribute from the cloud HR app to Active Directory and sync it with Azure AD. After the **Mobile Number** attribute is in Azure AD, you can enable SSPR for the user's account. Then on day one, the new user can use the registered and verified mobile number for authentication. Refer to the [SSPR documentation](../authentication/howto-sspr-authenticationdata.md) for details on how to prepopulate authentication contact information.
429429

430430
## Plan for initial cycle
431431

@@ -452,7 +452,7 @@ After you configure the cloud HR app to Azure AD user provisioning, run test cas
452452
|User is terminated in the cloud HR app.|- The user account is disabled in Active Directory.</br>- The user can't log into any enterprise apps protected by Active Directory.
453453
|User supervisory organization is updated in the cloud HR app.|Based on the attribute mapping, the user account moves from one OU to another in Active Directory.|
454454
|HR updates the user's manager in the cloud HR app.|The manager field in Active Directory is updated to reflect the new manager's name.|
455-
|HR rehires an employee into a new role.|Behavior depends on how the cloud HR app is configured to generate employee IDs:</br>- If the old employee ID is reused for a rehire, the connector enables the existing Active Directory account for the user.</br>- If the rehire gets a new employee ID, the connector creates a new Active Directory account for the user.|
455+
|HR rehires an employee into a new role.|Behavior depends on how the cloud HR app is configured to generate employee IDs:</br>- If the old employee ID is used for a rehired employee, the connector enables the existing Active Directory account for the user.</br>- If the rehired employee gets a new employee ID, the connector creates a new Active Directory account for the user.|
456456
|HR converts the employee to a contract worker or vice versa.|A new Active Directory account is created for the new persona and the old account gets disabled on the conversion effective date.|
457457

458458
Use the previous results to determine how to transition your automatic user provisioning implementation into production based on your established timelines.

articles/active-directory/develop/includes/web-app/quickstart-aspnet.md

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ See [How the sample works](#how-the-sample-works) for an illustration.
2626
## Prerequisites
2727

2828
* An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
29-
* [Visual Studio 2019](https://visualstudio.microsoft.com/vs/)
29+
* [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
3030
* [.NET Framework 4.7.2+](https://dotnet.microsoft.com/download/visual-studio-sdks)
3131

3232
## Register and download the app
@@ -71,11 +71,11 @@ If you want to manually configure your application and code sample, use the foll
7171
3. Depending on the version of Visual Studio, you might need to right-click the project **AppModelv2-WebApp-OpenIDConnect-DotNet** and then select **Restore NuGet packages**.
7272
4. Open the Package Manager Console by selecting **View** > **Other Windows** > **Package Manager Console**. Then run `Update-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform -r`.
7373

74-
5. Edit *Web.config* and replace the parameters `ClientId`, `Tenant`, and `redirectUri` with:
75-
```xml
76-
<add key="ClientId" value="Enter_the_Application_Id_here" />
77-
<add key="Tenant" value="Enter_the_Tenant_Info_Here" />
78-
<add key="redirectUri" value="https://localhost:44368/" />
74+
5. Edit *appsettings.json* and replace the parameters `ClientId`, `Tenant`, and `redirectUri` with:
75+
```json
76+
"ClientId" :"Enter_the_Application_Id_here" />
77+
"TenantId": "Enter_the_Tenant_Info_Here" />
78+
"RedirectUri" :"https://localhost:44368/" />
7979
```
8080
In that code:
8181

@@ -100,48 +100,30 @@ This section gives an overview of the code required to sign in users. This overv
100100
You can set up the authentication pipeline with cookie-based authentication by using OpenID Connect in ASP.NET with OWIN middleware packages. You can install these packages by running the following commands in Package Manager Console within Visual Studio:
101101

102102
```powershell
103-
Install-Package Microsoft.Owin.Security.OpenIdConnect
103+
Install-Package Microsoft.Identity.Web.Owin
104+
Install-Package Microsoft.Identity.Web.MicrosoftGraph
104105
Install-Package Microsoft.Owin.Security.Cookies
105-
Install-Package Microsoft.Owin.Host.SystemWeb
106106
```
107107

108108
### OWIN startup class
109109

110110
The OWIN middleware uses a *startup class* that runs when the hosting process starts. In this quickstart, the *startup.cs* file is in the root folder. The following code shows the parameters that this quickstart uses:
111111

112112
```csharp
113-
public void Configuration(IAppBuilder app)
114-
{
115-
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
116-
117-
app.UseCookieAuthentication(new CookieAuthenticationOptions());
118-
app.UseOpenIdConnectAuthentication(
119-
new OpenIdConnectAuthenticationOptions
120-
{
121-
// Sets the client ID, authority, and redirect URI as obtained from Web.config
122-
ClientId = clientId,
123-
Authority = authority,
124-
RedirectUri = redirectUri,
125-
// PostLogoutRedirectUri is the page that users will be redirected to after sign-out. In this case, it's using the home page
126-
PostLogoutRedirectUri = redirectUri,
127-
Scope = OpenIdConnectScope.OpenIdProfile,
128-
// ResponseType is set to request the code id_token, which contains basic information about the signed-in user
129-
ResponseType = OpenIdConnectResponseType.CodeIdToken,
130-
// ValidateIssuer set to false to allow personal and work accounts from any organization to sign in to your application
131-
// To only allow users from a single organization, set ValidateIssuer to true and the 'tenant' setting in Web.config to the tenant name
132-
// To allow users from only a list of specific organizations, set ValidateIssuer to true and use the ValidIssuers parameter
133-
TokenValidationParameters = new TokenValidationParameters()
134-
{
135-
ValidateIssuer = false // Simplification (see note below)
136-
},
137-
// OpenIdConnectAuthenticationNotifications configures OWIN to send notification of failed authentications to the OnAuthenticationFailed method
138-
Notifications = new OpenIdConnectAuthenticationNotifications
139-
{
140-
AuthenticationFailed = OnAuthenticationFailed
141-
}
142-
}
143-
);
144-
}
113+
public void Configuration(IAppBuilder app)
114+
{
115+
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
116+
117+
app.UseCookieAuthentication(new CookieAuthenticationOptions());
118+
OwinTokenAcquirerFactory factory = TokenAcquirerFactory.GetDefaultInstance<OwinTokenAcquirerFactory>();
119+
120+
app.AddMicrosoftIdentityWebApp(factory);
121+
factory.Services
122+
.Configure<ConfidentialClientApplicationOptions>(options => { options.RedirectUri = "https://localhost:44368/"; })
123+
.AddMicrosoftGraph()
124+
.AddInMemoryTokenCaches();
125+
factory.Build();
126+
}
145127
```
146128

147129
|Where | Description |
@@ -155,10 +137,6 @@ public void Configuration(IAppBuilder app)
155137
| `TokenValidationParameters` | A list of parameters for token validation. In this case, `ValidateIssuer` is set to `false` to indicate that it can accept sign-ins from any personal, work, or school account type. |
156138
| `Notifications` | A list of delegates that can be run on `OpenIdConnect` messages. |
157139

158-
159-
> [!NOTE]
160-
> Setting `ValidateIssuer = false` is a simplification for this quickstart. In real applications, validate the issuer. See the samples to understand how to do that.
161-
162140
### Authentication challenge
163141

164142
You can force a user to sign in by requesting an authentication challenge in your controller:
@@ -182,6 +160,24 @@ public void SignIn()
182160

183161
You can protect a controller or controller actions by using the `[Authorize]` attribute. This attribute restricts access to the controller or actions by allowing only authenticated users to access the actions in the controller. An authentication challenge will then happen automatically when an unauthenticated user tries to access one of the actions or controllers decorated by the `[Authorize]` attribute.
184162

163+
### Call Microsoft Graph from the controller
164+
165+
You can call Microsoft Graph from the controller by getting the instance of GraphServiceClient using the `GetGraphServiceClient` extension method on the controller, like in the following code:
166+
167+
```csharp
168+
try
169+
{
170+
var me = await this.GetGraphServiceClient().Me.Request().GetAsync();
171+
ViewBag.Username = me.DisplayName;
172+
}
173+
catch (ServiceException graphEx) when (graphEx.InnerException is MicrosoftIdentityWebChallengeUserException)
174+
{
175+
HttpContext.GetOwinContext().Authentication.Challenge(OpenIdConnectAuthenticationDefaults.AuthenticationType);
176+
return View();
177+
}
178+
```
179+
180+
185181
[!INCLUDE [Help and support](../../../../../includes/active-directory-develop-help-support-include.md)]
186182

187183
## Next steps

0 commit comments

Comments
 (0)