Purview: How to exclude folder, but not its contents from scan?

Suranga Kasturi 5 Reputation points
2023-05-02T01:44:02.4333333+00:00

Hello,

I'm trying to setup a scan. I've noticed that purview includes 'object type' folders as 'assets', which doesn't work for me.

As an example, consider a folder named F1 has files D1 and D2. I want D1 & D2 recognized as assets, but not F1, because on its own, its not an usable asset to me.

Of course, I could go in and delete them after a scan is completed, but would prefer to exclude them during the scan itself.

Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,164 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Bhargava-MSFT 31,011 Reputation points Microsoft Employee
    2023-05-02T18:52:53.1+00:00

    Hello Suranga Kasturi,

    Welcome to the MS Q&A platform.

    To exclude certain assets during scanning, you can define regular expressions (regex) in the Ignore patterns. During scanning, Microsoft Purview will compare the asset's URL against these regular expressions. All assets matching any of the regexes mentioned will be ignored while scanning.

    To access the Ignore patterns , follow these steps:

    • Go to the Scan rule sets page.
    • Select the scan rule set you want to edit.
    • In the Scan rule set page, select the Ignore Patterns tab.

    You can use the regex expression:
    Example:

    https://bhargavasynapsegen2.dfs.core.windows.net/card$ (this will ignore the folders but not the contents)

    Using the above expression, the scan ignores the card folder but will scan inside the files.

    Without ignore patterns:
    User's image

    With ignore patterns.

    Assets discovered is only 6(ignored my folder-card)

    User's image

    Reference document:
    https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/purview/create-a-scan-rule-set.md

    https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/purview/concept-best-practices-scanning.md

    I hope this helps. Please let me know if you have any further questions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.