Skip to content

Commit a237cfe

Browse files
committed
add exercise units
1 parent e04962d commit a237cfe

File tree

5 files changed

+353
-0
lines changed

5 files changed

+353
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.purview-implement-manage-retention.exercise-retention-labels
3+
title: Exercise - Configure retention labels for financial and HR content
4+
metadata:
5+
title: Exercise - Configure retention labels for financial and HR content
6+
description: "Exercise - Configure retention labels for financial and HR content."
7+
ms.date: 07/02/2025
8+
author: wwlpublish
9+
ms.author: riswinto
10+
ms.topic: unit
11+
azureSandbox: false
12+
labModal: false
13+
durationInMinutes: 15
14+
content: |
15+
[!include[](includes/exercise-retention-labels.md)]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.purview-implement-manage-retention.exercise-retention-policies
3+
title: Exercise - Configure static and adaptive retention policies in Microsoft Purview
4+
metadata:
5+
title: Exercise - Configure static and adaptive retention policies in Microsoft Purview
6+
description: "Exercise - Configure static and adaptive retention policies in Microsoft Purview."
7+
ms.date: 07/02/2025
8+
author: wwlpublish
9+
ms.author: riswinto
10+
ms.topic: unit
11+
azureSandbox: false
12+
labModal: false
13+
durationInMinutes: 15
14+
content: |
15+
[!include[](includes/exercise-retention-policies.md)]
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
Retention labels give you more control over how long individual items are kept. They're useful when content needs to be managed differently based on type, department, or business need. You can publish labels so users can apply them manually or configure them to apply automatically based on conditions.
2+
3+
In this exercise, you create two retention labels: one for financial content and one for HR content. You publish the financial label to make it available in email and SharePoint. Then you configure the HR label to auto-apply when sensitive content is detected. Last, you configure event-based retention so that retention starts based on specific events, like an employee leaving the organization.
4+
5+
**Estimated time to complete**: 45–60 minutes
6+
7+
> [!IMPORTANT]
8+
> To complete this exercise, you need access to Microsoft Purview features through one of these Microsoft 365 licenses:
9+
>
10+
> - A Microsoft 365 E3 license is required to create and publish retention labels.
11+
> - A Microsoft 365 E5 license, or the E5 Information Protection and Governance add-on, is required for event-based retention and auto-apply capabilities.
12+
>
13+
> If your tenant doesn't include these features, some tasks in the exercise might not be available. You can still follow the steps to understand how the configuration works or skip any unsupported tasks.
14+
>
15+
> If you don't have access to these features, you can join the [Microsoft 365 Developer Program](https://developer.microsoft.com/microsoft-365/dev-program). This program provides a free Microsoft 365 E5 developer subscription with access to many Purview capabilities.
16+
17+
## Create and publish a retention label for financial content
18+
19+
Start by creating a retention label that keeps financial content for seven years, then deletes it. After creating the label, publish it to make it available to users in Exchange and SharePoint.
20+
21+
1. In the Microsoft Purview portal, go to **Solutions** > **Data Lifecycle Management**.
22+
1. Select **Retention labels**.
23+
1. Select **+ Create a label**.
24+
1. On the **Name your retention label** page, enter:
25+
26+
- **Name**: `Financial - 7 years`
27+
- **Description for admins**: `Retains financial content for 7 years, then deletes.`
28+
- **Description for users**: `Use for financial records that must be kept for 7 years.`
29+
30+
1. Select **Next**.
31+
1. On the **Define label settings** page, select **Retain items forever or for a specific period**, then select **Next**.
32+
1. On the **Define the retention period** page:
33+
34+
- Set the retention period to **7 years**.
35+
- Start retention based on **when items were created**.
36+
37+
1. Select **Next**.
38+
1. On the **Choose what happens after the retention period** page, select **Delete items automatically**, then select **Next**.
39+
1. On the **Review and finish** page, confirm your settings, then select **Create label**.
40+
1. On the **Your retention label is created** page, select **Publish this label to Microsoft 365 locations**, then select **Done**.
41+
1. On the **Choose retention labels to publish** page, make sure the `Financial - 7 years` label is selected, then select **Next**.
42+
1. On the **Policy Scope** page, leave the default selected, then select **Next**.
43+
1. On the **Choose the type of retention policy to create​**, select **Static**.
44+
1. On the **Choose where to publish labels** page, select **All locations. Includes content in Exchange email, Office 365 groups, OneDrive and SharePoint documents.**
45+
1. Select **Next**.
46+
1. On the **Name your policy** page, enter:
47+
48+
- **Name**: `Financial label policy`
49+
- **Description**: `Applies to all locations: Exchange, Microsoft 365 Groups, OneDrive, and SharePoint.`
50+
51+
1. Select **Next**.
52+
53+
1. On the **Finish** page, confirm your settings, then select **Submit**.
54+
1. After your policy is created, select **Done**.
55+
56+
This label and policy now apply a seven-year retention period to financial content across email and SharePoint. Users can apply the label manually to ensure content is retained and deleted according to your organization’s policies.
57+
58+
## Create an auto-apply retention label for HR content
59+
60+
Now create a retention label for HR content that applies automatically when specific types of information are detected. This label will apply to content that contains U.S. Social Security Numbers (SSNs), helping ensure sensitive HR records are retained even if users don’t manually apply a label.
61+
62+
1. In the Microsoft Purview portal, go to **Solutions** > **Data Lifecycle Management**.
63+
1. Select **Retention labels**, then select **+ Create a label**.
64+
1. On the **Name your retention label** page, enter:
65+
66+
- **Name**: `HR - 10 years`
67+
- **Description for admins**: `Applies to HR content. Retains for 10 years, then deletes.`
68+
- **Description for users**: `Use for HR records that need to be kept for 10 years.`
69+
70+
1. Select **Next**.
71+
1. On the **Define label settings** page, select **Retain items forever or for a specific period**, then select **Next**.
72+
1. On the **Define the retention period** page:
73+
74+
- Set the retention period to **10 years**.
75+
- Start retention based on **when items were created**.
76+
77+
1. Select **Next**.
78+
1. On the **Choose what happens after the retention period** page, select **Delete items automatically**, then select **Next**.
79+
1. On the **Review and finish** page, confirm your settings, then select **Create label**.
80+
1. After the label is created, select **Auto-apply this label to content**, then select **Done**.
81+
1. On the **Let's get started** page, enter:
82+
83+
- **Name**: `Auto-apply HR - SSN`
84+
- **Description**: `Automatically applies the HR label to content containing SSNs.`
85+
86+
1. Select **Next**.
87+
1. On the **Choose how you want to apply labels to content** page, select **Apply label automatically based on sensitive info**, then select **Next**.
88+
1. On the **Content that contains sensitive info** page, select a **custom** category and regulation, then select **Next**.
89+
1. On the **Define content that contains sensitive info** page, in the **Content contains** section, enter `US SSN` as the group name, then select the **Add** > **Sensitive info types**.
90+
1. In the **Sensitive info types** types flyout, search for `SSN`, then select the **U.S. Social Security Number (SSN)**.
91+
1. Select **Add** at the bottom of the flyout, then select **Next** on the **Define content that contains sensitive info** page.
92+
1. On the **Policy Scope** page, leave the default selected, then select **Next**.
93+
1. On the **Choose the type of retention policy to create** page, select **Static**, then select **Next**.
94+
1. On the **Choose locations** page, select:
95+
96+
- **Exchange mailboxes**
97+
- **SharePoint classic and communication sites**
98+
- **OneDrive accounts**
99+
100+
1. Select **Next**.
101+
1. On the **Choose a label to auto-apply** page, make sure the **HR - 10 years** label is selected, then select **Next**.
102+
1. On the **Decide whether to test or run your policy** page, select **Turn on policy**, then select **Next**.
103+
1. On the **Review and finish** page, confirm your settings, then select **Submit**.
104+
1. After your policy is created, select **Done**.
105+
106+
This auto-labeling policy now applies the HR retention label to content that contains Social Security numbers. By automating label application, you help ensure that sensitive information is consistently protected without relying on users to apply labels manually.
107+
108+
## Configure event-based retention
109+
110+
For some content, retention needs to start based on a specific event, such as when an employee leaves the organization or a contract is finalized. Event-based retention labels allow you to trigger the retention period only after that event occurs.
111+
112+
In this task, you configure an event-based retention label for employee files and create a new event type to support it. This setup ensures that retention for HR documents begins only after the employee offboarding process is complete.
113+
114+
1. In the Microsoft Purview portal, go to **Solutions** > **Data Lifecycle Management**.
115+
1. Select **Retention labels**, then select **+ Create a label**.
116+
1. On the **Name your retention label** page, enter:
117+
118+
- **Name**: `Employee files - 7 years`
119+
- **Description for admins**: `Starts retention when an employee leaves. Keeps content for 7 years, then deletes.`
120+
- **Description for users**: `Use for employee files. Retention starts after the employee leaves.`
121+
122+
1. Select **Next**.
123+
1. On the **Define label settings** page, select **Retain items forever or for a specific period**, then select **Next**.
124+
1. On the **Define the retention period** page:
125+
126+
- Set the retention period to **7 years**.
127+
- In the **Start retention based on** section, select **+ Create new event type**.
128+
- In the **Create event type** flyout, enter:
129+
130+
- **Name**: `Employee departure`
131+
- **Description**: `Used to trigger retention for employee-related documents.`
132+
- Select **Next**.
133+
- On the **Summary** page, select **Submit**, then select **Done** once your event type is created.
134+
135+
- Back on the **Define the retention period** page, start the retention period based on **Employee departure**.
136+
137+
1. Select **Next**.
138+
1. On the **Choose what happens after the retention period** page, select **Delete items automatically**, then select **Next**.
139+
1. On the **Review and finish** page, confirm your settings, then select **Create label**.
140+
1. On the **Your retention label is created** page, select **Publish this label to Microsoft 365 locations**, then select **Done**.
141+
1. On the **Choose labels to publish** page, make sure the **Employee files - 7 years** label is selected, then select **Next**.
142+
1. On the **Policy Scope** page, leave the default selected, then select **Next**.
143+
1. On the **Choose the type of retention policy to create​** page, select **Static**, then select **Next**.
144+
1. On the **Choose where to publish labels** page, select **All locations. Includes content in Exchange email, Office 365 groups, OneDrive and SharePoint documents.**
145+
1. Select **Next**.
146+
1. On the **Name your policy** page, enter:
147+
148+
- **Name**: `Employee files label policy`
149+
- **Description for admins**: `Makes the Employee files label available in Exchange, Microsoft 365 Groups, OneDrive, and SharePoint.`
150+
151+
1. Select **Next**.
152+
1. On the **Finish** page, confirm your settings, then select **Submit**.
153+
1. After your policy is created, select **Done**.
154+
155+
This label is now available to users and will trigger retention only when the Employee departure event occurs. Event-based retention gives you more control over when retention starts, especially for documents tied to key lifecycle events.
156+
157+
## Check your work
158+
159+
Review the labels and policies you created to make sure they're configured as expected.
160+
161+
1. Go to **Data Lifecycle Management** > **Retention labels**.
162+
1. Confirm these labels are listed:
163+
164+
- `Financial - 7 years`
165+
- `HR - 10 years`
166+
- `Employee files - 7 years`
167+
168+
1. Open each label and check that the retention duration, trigger, and action after the retention period match what you configured.
169+
1. Go to **Retention policies** and confirm these policies are listed:
170+
171+
- `Financial label policy`
172+
- `Auto-apply HR - SSN`
173+
- `Employee files label policy`
174+
175+
1. Open each policy and confirm:
176+
177+
- The correct label is included
178+
- The right Microsoft 365 locations are selected
179+
- The policy type (manual, auto-apply, or event-based) matches the label
180+
181+
1. Go to **Event types** and confirm that `Employee departure` is listed
182+
183+
These steps help verify that each label and policy works as intended. Confirming retention durations, triggers, and scopes now can help prevent misconfigured settings from affecting real data later.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
Retention policies let you manage how long content is kept across Microsoft 365 services. In some cases, a single policy might be enough to cover your organization's needs. In others, you might need different policies for different groups of users.
2+
3+
In this exercise, you'll create one retention policy that applies broadly across the organization and another that targets specific departments. The first policy uses a static scope to apply to common workloads. The second uses an adaptive scope that targets users based on their department attribute.
4+
5+
**Estimated time to complete**: 30-40 minutes
6+
7+
> [!IMPORTANT]
8+
> To complete this exercise, you need access to Microsoft Purview features through one of these Microsoft 365 licenses:
9+
>
10+
> - A Microsoft 365 E3 license is required to create and manage static retention policies.
11+
> - A Microsoft 365 E5 license, or the E5 Information Protection and Governance add-on, is required to use adaptive scopes.
12+
>
13+
> If your tenant doesn't include these features, some tasks in the exercise might not be available. You can still follow the steps to understand how the configuration works or skip any unsupported tasks.
14+
>
15+
> If you don't have access to these features, you can join the [Microsoft 365 Developer Program](https://developer.microsoft.com/microsoft-365/dev-program). This program provides a free Microsoft 365 E5 developer subscription with access to many Purview capabilities.
16+
17+
## Create a retention policy for all users
18+
19+
Start by creating a retention policy that applies to the most commonly used Microsoft 365 locations. This policy uses a static scope and sets a consistent retention period across mail, files, and group content.
20+
21+
1. Navigate to [Microsoft Purview](https://purview.microsoft.com) and sign in.
22+
1. Select **Solutions** > **Data lifecycle management**.
23+
1. Expand **Policies**, then select **Retention policies**.
24+
1. Select **+ New retention policy**.
25+
1. On the **Name your retention policy** page, enter:
26+
27+
- **Name**: `Core retention - 5 years`
28+
- **Description**: `Retains content for 5 years, then deletes. Used to meet baseline compliance needs.`
29+
30+
1. Select **Next**.
31+
1. On the **Policy Scope** page, leave the default selected, then select **Next**.
32+
1. On the **Choose the type of retention policy to create​** page, select **Static**, then select **Next**.
33+
1. On the **Choose where to apply this policy** page, select:
34+
35+
- **Exchange mailboxes**
36+
- **SharePoint classic and communication sites**
37+
- **OneDrive accounts**
38+
- **Microsoft 365 Groups**
39+
40+
1. Select **Next**.
41+
1. On the **Decide if you want to retain content, delete it, or both** page:
42+
43+
- Retain items for **5 years**
44+
- Start the retention period based on **when items were last modified**.
45+
- Delete items automatically at the end of the retention period.
46+
1. Select **Next**.
47+
1. On the **Review and finish** page, confirm your settings, then select **Submit**.
48+
1. After your policy is created, select **Done**.
49+
50+
This policy now applies a five-year retention period across your organization's core workloads.
51+
52+
## Create an adaptive scope for legal and HR departments
53+
54+
Now create an adaptive scope that targets users in the Legal and HR departments. This scope lets you apply retention settings to those users automatically based on their Microsoft Entra ID attributes, without assigning accounts one by one.
55+
56+
1. In the Microsoft Purview portal, go to **Settings**.
57+
1. Expand **Roles and scopes**, then select **Adaptive scopes**.
58+
1. Select **+ Create scope**.
59+
1. On the **Name your adaptive policy scope** page, enter:
60+
61+
- **Name**: `Legal and HR departments`
62+
- **Description**: `Applies to users in the Legal and HR departments.`
63+
64+
1. Select **Next**.
65+
1. On the **Assign admin unit** page, leave the default selected, then select **Next**.
66+
1. On the **What type of scope do you want to create?​** page, select **Users**, then select **Next**.
67+
1. On the **Create the query to define users** page, configure the query:
68+
69+
- **Attribute**: Department
70+
- **Operator**: is equal to
71+
- **Value**: Legal
72+
73+
1. Select **+ Add attribute**, then add:
74+
75+
- **Query operator**: Or
76+
- **Attribute**: Department
77+
- **Operator**: is equal to
78+
- **Value**: HR
79+
80+
1. Select **Next**.
81+
82+
1. On the **Review and finish** page, confirm your settings, then select **Submit**.
83+
1. After your adaptive scope is created, select **Done**.
84+
85+
The adaptive scope now targets users in either the Legal or HR department based on their Microsoft Entra ID attributes.
86+
87+
## Create a retention policy with an adaptive scope
88+
89+
Use the adaptive scope you created to apply a targeted retention policy. This lets you enforce different retention settings for specific departments without applying them to all users.
90+
91+
1. Return to **Data lifecycle management** in the Microsoft Purview portal.
92+
1. Select **Policies** > **Retention policies**, then select **+ New retention policy**.
93+
1. On the **Name your retention policy** page, enter:
94+
95+
- **Name**: `Legal data retention`
96+
- **Description**: `Applies retention settings to Legal and HR departments.`
97+
98+
1. Select **Next**.
99+
1. On the **Policy Scope** page, leave the default selected, then select **Next**.
100+
1. On the **Choose the type of retention policy to create​** page, select **Adaptive**, then select **Next**.
101+
1. On the **Choose adaptive policy scopes and locations** page:
102+
103+
- Select **+ Add scopes**, then choose the **Legal and HR departments** scope you created earlier.
104+
- Select **Add**.
105+
- Under **Choose locations**, enable:
106+
107+
- **Exchange mailboxes**
108+
- **OneDrive accounts**
109+
1. Select **Next**.
110+
1. On the **Decide if you want to retain content, delete it, or both** page, configure the retention settings:
111+
112+
- Retain items for **7 years**.
113+
- Start the retention period based on **when items were created**.
114+
- Choose to **do nothing** at the end of the retention period.
115+
1. Select **Next**.
116+
1. On the **Review and finish** page, confirm your settings, then select **Submit**.
117+
1. After your policy is created, select **Done**.
118+
119+
This policy now applies a seven-year retention period to mail and files for users in the Legal and HR departments only.
120+
121+
## Check your work
122+
123+
To make sure everything is configured correctly, review both the policies and the adaptive scope you created.
124+
125+
1. In the Microsoft Purview portal, go to **Data lifecycle management**, then select **Policies** > **Retention policies**.
126+
1. Confirm that both of the following policies appear in the list:
127+
128+
- `Core retention - 5 years`
129+
- `Legal data retention`
130+
131+
1. Select each policy and review the settings:
132+
133+
- For the **Core retention - 5 years** policy, verify that it uses a static scope and includes all main locations.
134+
- For the **Legal data retention** policy, confirm that it uses an adaptive scope and applies only to Exchange mailboxes and OneDrive accounts.
135+
1. Go to **Settings** > **Roles and scopes** > **Adaptive scopes**.
136+
1. Confirm that the adaptive scope named `Legal and HR` appears and includes the department filters for Legal and HR.
137+
138+
If everything appears as expected, you've successfully applied retention policies using both static and adaptive scopes.

0 commit comments

Comments
 (0)