Edit

Use the document PII playground in Microsoft Foundry

Note

This content refers to the new Foundry portal, which supports only Foundry projects and provides streamlined access to models, agents, and tools. To confirm that you're using new Foundry, make sure the version toggle in the portal banner is in the on position.

The document PII playground in Microsoft Foundry lets you detect and redact personally identifiable information (PII) in native documents interactively, without writing code. The playground ships with curated sample documents and expected outputs, so you can evaluate detection of common entity types - including names, addresses, financial IDs, and health identifiers - without uploading your own data. You can then transition to uploading your own .pdf, .docx, or .txt files when you're ready to test with real content.

Processing is handled by the existing asynchronous native-file document-based PII pipeline - the same workflow described in Detect and redact PII in native documents. The playground uses the same Document PII model and policies as the production API, so results align with production behavior.

After the job completes, the playground displays the redacted output side-by-side with the source document. A single view lets you compare detection results across entity categories, review confidence scores, and assess file-fidelity output before integrating the API.

Prerequisites

Tip

  • If you already have an Azure Language in Foundry Tools or multi-service resource—whether used on its own or through Language Studio—you can continue to use those existing Language resources within the Microsoft Foundry portal.
  • For more information, see Connect services in the Microsoft Foundry portal.
  • Consider using a Foundry resource for the best experience. You can also follow these instructions with a Language resource.

Role-based access control (RBAC) requirements

Assign the correct roles to your user principal and project managed identity to access the document PII playground. Microsoft recommends using Microsoft Entra ID authentication, which enforces role-based restrictions. Key-based authentication grants full access without role checks and should be avoided in production environments.

Important

The Foundry RBAC roles were recently renamed. Foundry User, Foundry Owner, Foundry Account Owner, and Foundry Project Manager were previously named Azure AI User, Azure AI Owner, Azure AI Account Owner, and Azure AI Project Manager. You might still see the previous names in some places while the rename rolls out. The role IDs and core permissions are unchanged.

The active project appears in the upper-left corner. To create a new project:

  1. Open the project drop-down menu.

  2. Enter a project name or select an existing one.

  3. Select Create project.

    Screenshot of the new Foundry homepage.

There are two ways to access the document PII interface:

  • Select the Discover tab from the upper-right navigation bar:

    1. In the search bar, enter Azure and press Enter.
    2. Select Azure-Language-Document-PII redaction from the results.
    3. Select Open in Playground.
  • Select the Build tab from the upper-right navigation bar:

    1. From the left navigation bar, select Models.
    2. Select the AI services tab.
    3. Select Azure-Language-Document-PII redaction to go directly to the playground.

Redact PII from documents

The Azure-Language-Document-PII redaction model identifies and redacts personally identifiable information in native document files, including .pdf, .docx, and .txt files. The playground preserves document layout and formatting in the redacted output.

  1. On the Playground tab, select Azure Language—Document PII redaction from the drop-down menu.

  2. Use the prepared sample document that loads by default, or use the paperclip icon to upload your own .pdf, .docx, or .txt document.

  3. In the Configure pane, set the following options:

    Option Description
    API version Select the API version that you prefer to use.
    Model version Select the model version that you prefer to use.
    Language Select the language in which your document is written.
    Select types to include Select the PII types you want to redact.
    Policy type Choose the type of redaction policy to apply (character mask, entity mask, or no mask).
  4. Select Detect. The request is submitted through the existing asynchronous native-file document-based PII pipeline. After processing completes, the redacted document is displayed side-by-side with the source document for comparison. You can review the detected entities in the Details pane.

    Field Description
    Type The detected entity type (category).
    Confidence The model's level of certainty regarding whether it correctly identified an entity type.
    Offset The position of the entity within the document.
    Length The character length of the entity.

    The side-by-side view also reflects file-fidelity results, showing how well the redacted output preserves the original document's layout and formatting. Use this to evaluate both redaction accuracy and document rendering quality before integrating the API.

Verify that the detected entities match the PII in your input document. Use the Edit button to modify Configure parameters and resubmit the document as needed.