Edit

Use the conversation 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 conversation PII playground in Azure AI Foundry lets you detect and redact personally identifiable information (PII) in conversational text interactively, without writing code. You can submit transcript-style input, configure redaction options, and review detected entities before integrating the feature into your application.

Important

Conversation PII API (2025-11-15-preview) and Conversation PII model (2026-04-15-preview) are licensed to you as part of your Azure subscription and are subject to terms applicable to "Previews" in the Microsoft Product Terms and the Microsoft Products and Services Data Protection Addendum (DPA), as well as the Supplemental Terms of Use for Microsoft Azure Previews.

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 conversation 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 conversation 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-Conversational-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-Conversational-PII redaction to go directly to the playground.

Extract PII from conversations

The extract PII from conversations feature detects and masks personally identifying information in conversational text. This feature is designed to handle the unique structure and context of conversations, such as dialogues or chat logs.

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

  2. Select a sample transcript, use the paperclip icon to upload your transcript, or enter conversation turn text.

  3. Format your conversation with each turn on a new line and include speaker labels if possible. Inconsistent use of participant ID, colon, message, or new line may produce unexpected output. Here's an example of well-formatted conversation text:

    Speaker 1: Hello, how are you?
    Speaker 2: I'm good, thank you! How about you?
    Speaker 1: I'm doing well, thanks for asking.
    

    Tip

    You can use built-in formatting assistant (Format for me) in the playground to ensure your input meets expected conversation structure.

  4. 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 source text is written.
    Select types to include Select the PII types you want to redact.
    Specify redaction character Choose the character used to mask sensitive text.
  5. Select Detect. Detected entities are highlighted in the text, and you can review the accompanying details in formatted text or as a JSON response.

    Screenshot of PII conversation detection output in the Foundry playground.

    Field Description
    Type The detected entity type.
    Confidence The model's level of certainty that it correctly identified the entity type.
    Offset The number of characters from the beginning of the text to the entity.
    Length The character length of the entity.

Verify that the detected entities match the PII in your input conversation. Select Edit to modify the Configure settings and rerun detection as needed.

Open in Visual Studio Code 🆕

After validating your scenario in the playground, select Open in VS Code to carry your current configuration directly into a development environment—no manual setup required.

  1. Configure your scenario in the playground:
    • Select your API version and model version.
    • Enter and test your sample input.
    • Adjust options such as entity types, redaction character, and language.
  2. Select Open in VS Code.
  3. Visual Studio Code opens with a preconfigured code sample that reflects your playground configuration, including your API version, model, and redaction settings.

Tip

Use the playground to compare outputs across API versions, for example, preview versus GA—before exporting your configuration to code.

Next steps

After opening in Visual Studio Code:

  1. Add your authentication credentials.
  2. Replace the sample input with your production data.
  3. Run and validate the request.
  4. Integrate the code into your application workflow.