Can't detect New Zealand Bank Account/Driver License/inland Revenue/Ministry of health/Social Welfare Number

Mohsin Khan 60 Reputation points
2025-05-19T08:08:28.67+00:00

Hey Greetings,

PII entities failed to detected by Azure AI Language Service specific to country New Zealand.

Please suggest how should proceed ?

Regards,

Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
524 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Leo Tran 5 Reputation points
    2025-05-20T09:48:22.73+00:00

    Hi Mohsin Khan,

    Thank you for contacting Q&A Forum. I would like to provide my findings and proposed solution:

    The Azure AI Language PII detection Preview API is still under development and may undergo changes. It is not recommended for production use. Customers should wait for the General Availability (GA) release, which will offer stable features and full support. For more information on the PII detection feature and its current capabilities, you can refer to the official documentation:

    Government and country/region-specific identification

    To address the issue of Azure AI Language Service not detecting New Zealand-specific PII entities such as bank account numbers, driver's license numbers, Inland Revenue numbers, Ministry of Health numbers, and Social Welfare numbers, ensure that these specific categories are explicitly included in the piiCategories parameter of your API request.

    For instance, include categories like NZBankAccountNumber, NZDriversLicenseNumber, NZInlandRevenueNumber, NZMinistryOfHealthNumber, and NZSocialWelfareNumber.

    Additionally, verify that the input text is in English, as these categories are supported in that language. If detection issues persist after these adjustments, consider testing with sample data to validate the configuration or consult Azure Support for further assistance.

    Kindly let me know if this work for you and please let me know if you have any further question.

    If I have answered your question, please accept this as answer as a token of appreciation and don't forget to thumbs up for "Was it helpful"!

    Best regards,


  2. SriLakshmi C 6,250 Reputation points Microsoft External Staff Moderator
    2025-05-22T07:00:36.1333333+00:00

    Hello @Mohsin Khan,

    I Understand that you're facing difficulties detecting New Zealand-specific Personally Identifiable Information (PII) using Azure AI Language Service, there are a few key areas to review and configure to ensure accurate detection.

    You must verify that your API request includes the correct piiCategories parameters.

    • NZBankAccountNumber for New Zealand Bank Account Number
    • NZDriversLicenseNumber for New Zealand Driver's License Number
    • NZInlandRevenueNumber for New Zealand Inland Revenue Number
    • NZMinistryOfHealthNumber for New Zealand Ministry of Health Number
    • NZSocialWelfareNumber for New Zealand Social Welfare Number

    These categories are not included by default, so you need to explicitly list them in your request payload to enable the model to identify these specific data types.

    Additionally, it's important to ensure that the input text you're analyzing is in English, as these New Zealand-specific PII categories currently support detection in English only. If your data is in another language, the detection may not work as expected.

    If you’ve configured everything correctly but the service still isn’t identifying the entities, it's worth checking the format of your input data. The model relies on recognizable patterns to extract PII, so poorly structured or incomplete inputs might lead to missed detections. In such cases, testing with sample data that closely mirrors real-world formats for bank accounts, IRD numbers, or driver's licenses can help verify whether your setup is correct and whether the model is working as intended.

    Please note that these New Zealand-specific PII categories are currently in preview, meaning they are still being refined and may not yet offer full detection accuracy or stability compared to generally available features. Microsoft regularly enhances these capabilities, please keep monitor Azure updates for any improvements or expanded support as the feature moves toward General Availability (GA).

    Also please refer this Supported Personally Identifiable Information (PII) entity categories.

    I Hope this helps. Do let me know if you have any further queries.


    If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

    Thank you!


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.