Identifying Files by Naming Pattern in Purview Auto-Apply Policies
Short answer
C Use a sensitive info type to identify files by applying a regular expression pattern to the file names.
Question
• aei_AA989.docx
• bci_WS098.docx
• cei_DF112.docx
• ebc_QQ454.docx
• ecc_BB565.docx
All documents that use this naming format must be labeled as Project Documents:
You need to create an auto-apply retention label policy.
What should you use to identify the files?
Key Takeaways
The trap is confusing content-based ML tools (Trainable Classifiers) with rule-based pattern detectors (SITs) for file name matching.
Learn how to use Sensitive Info Types with regular expressions to auto-apply retention labels to SharePoint files based on their naming format in SC-401.
Common mistake: Choosing B (Trainable Classifier) because it handles complex patterns, but it is unnecessary and less precise for simple regex file name matching compared to SITs.
Expert Analysis
Pattern Matching for File Names
The scenario requires auto-applying a retention label to files based on a specific naming convention (e.g., aei_AA989.docx). The key constraint is that the detection criterion is the file name structure, not the content within the document.
Evaluating Trainable Classifiers
Trainable classifiers use machine learning models to identify sensitive information. While powerful, they are generally designed for analyzing document content and metadata patterns that are complex or unstructured. Using a trainable classifier for a simple, static regular expression pattern in a file name is over-engineered and often less precise for strict string matching than dedicated info types.
Sensitivity Information Types (SITs)
Sensitive Information Types (SITs) are rules-based detectors. Microsoft Purview SITs support various data sources, including file names. You can configure a SIT to use a Regular Expression (Regex) to match specific patterns. In this case, a regex like ^[a-z]{3}_[A-Z]{2}\d{3}\.docx$ can precisely identify the required files. This is the standard, documented method for pattern-based detection in file names without requiring ML training.
Conclusion
Since the requirement is a deterministic pattern match on file names, a Sensitive Info Type configured with a Regex is the correct and most efficient tool. Comments suggesting SITs target only content are incorrect; SITs explicitly support file name inspection via regex.
Official Reference
https://learn.microsoft.com/en-us/purview/apply-retention-labels-automatically
This link opens the official vendor documentation in a new tab.
Exam Strategy
When asked to detect specific patterns in file names or emails, look for 'Sensitive Information Types' first. Reserve 'Trainable Classifiers' for when you need to train an ML model on unique, non-standard content that doesn't fit a regex rule.
Frequently Asked Questions
Can Sensitive Info Types detect patterns in file names?
Why not use a Trainable Classifier for file names?
Community Votes
80% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
florinvele 👍 6 Answered CSIT with a regex as pattern
-
Eltooth 👍 2 Answered CC is correct answer: Sensitive info type https://learn.microsoft.com/en-us/purview/apply-retention-labels-automatically You can configure auto-apply retention label policies based on: Sensitive information types Keywords or searchable properties Trainable classifiers In your scenario, where the filenames follow a structured format like: aei_AA989.docx bci_WS098.docx cei_DF112.docx “You can apply retention labels to content automatically when that content doesn't already have a retention label applied and contains sensitive information, keywords or searchable properties, or a match for trainable classifiers.”
-
rvln7 👍 2SITs are primarily designed for content inspection but they absolutely support pattern‑based detection in file names. So there is no need for machine learning model here, just: ^[a-z]{3}_[A-Z]{2}\d{3}\.docx$ :D
-
Jideakin 👍 2I thought SIT targets content, not file names. I would pick Trainable Classifier here.
-
martinods 👍 1please share the documentation link to support this
Show 1 more comment
-
rvln7 👍 1 Answered CCORRECT SIT- regex
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.