Protecting Personal Identifiable Information with Azure AI
Tags: python, machinelearning, azure, ai
Published: 2020-04-24 19:30:46

---
title: Protecting Personal Identifiable Information with Azure AI
published: true
date: 2020-04-22 18:47:34 UTC
tags: python, machinelearning, azure, AI
canonical_url: https://medium.com/microsoftazure/protecting-personal-identifiable-information-with-azure-ai-aa4b7afc4839
---

![](https://cdn-images-1.medium.com/max/600/0*ZZO23S4dXW1hrnvh.jpg)

TLDR; The following post will outline both first party and open source techniques for detecting PII with Azure.

### What is PII?

Personally Identifiable information (PII), is any data that can be used used to identify a individuals such as names, driver’s license number, SSNs, bank account numbers, passport numbers, email addresses and more. Many regulations from GDPR to HIPPA require strict protection of user privacy.

If you are new to Azure you can get started a free subscription using the link below.

[Create your Azure free account today | Microsoft Azure](https://azure.microsoft.com/en-us/free/?WT.mc.id=aiapril-medium-abornst)

### Detecting PII With Azure Cognitive Search (Preview)

[Azure Cognitive Search](https://azure.microsoft.com/en-us/services/search/?WT.mc.id=aiapril-medium-abornst) is a cloud solution that provides developers APIs and tools for adding a rich search experience to their data, content and applications. With cognitive search you can add cognitive skills to apply AI processes during indexing. Doing so can add new information and structures useful for search and other scenarios.

![](https://cdn-images-1.medium.com/max/1024/1*jQugUslgSGP0O9UfgFfs1g.png)

The Azure **PII Detection** skill (Currently in Preview) extracts personally identifiable information from an input text and gives you the option to mask it from that text in various ways. This skill uses the machine learning models provided by [Text Analytics](https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview/?WT.mc.id=aiapril-medium-abornst) in Cognitive Services.

[PII Detection cognitive skill (preview) - Azure Cognitive Search](https://docs.microsoft.com/en-us/azure/search/cognitive-search-skill-pii-detection/?WT.mc.id=aiapril-medium-abornst)

### Detecting PII With Microsoft Presidio

In addition to the first party cognitive search Microsoft also provides an open source PII detection tool for Azure called Presidio which was developed by the Microsoft Commercial Software Engineering team in Israel.

[microsoft/presidio](https://github.com/microsoft/presidio)

### Why use Presidio?

Presidio is open-source, transparent, and scalable. Presidio allows developers and data scientists to customize or add new PII recognizers via API or code to best fit your anonymization needs. Presidio leverages docker and kubernetes for workloads at scale.

Presidio automatically detects Personal-Identifiable Information (PII) in unstructured text, annonymizes it based on one or more anonymization mechanisms, and returns a string with no personal identifiable data. For example:

![](https://cdn-images-1.medium.com/max/1024/0*7SsFA7s10OOlFesK.png)

For each PII entity, presidio returns a confidence score:

![](https://cdn-images-1.medium.com/max/1024/0*OE5j2ifYa7lcgIaK.png)

_Text anonymization in images_ (beta)

Presidio uses OCR to detect text in images. It further allows the redaction of the text from the original image.

![](https://cdn-images-1.medium.com/max/1024/0*MKEACNa3uTdSKl-_.png)

### Demo

Check out a public demo to try out on your own data with the link below.

[Presidio](https://presidio-demo.azurewebsites.net/)

### Deploying

Installation Steps

1. Navigate into <root>\deployment from command line.
2. If You have helm installed, but havn’t run helm init, execute [deploy-helm.sh](https://github.com/microsoft/presidio/blob/master/deploy-helm.sh) in the command line. It will install tiller (helm server side) on your cluster, and grant it sufficient permissions.
3. Grant the Kubernetes cluster access to the container registry follow these instructions to [grant the AKS cluster access to the ACR](https://docs.microsoft.com/en-us/azure/aks/cluster-container-registry-integration?WT.mc.id=aiapril-medium-abornst).
4. If you already have helm and tiller configured, or if you installed it in the previous step, execute [deploy-presidio.sh](https://github.com/microsoft/presidio/blob/master/deploy-presidio.sh) in the command line as follows:

```
deploy-presidio.sh
```

More information can be found on the github repo and near one click deployment options for Azure are coming soon!

Additional deployment options can be found [here](https://github.com/microsoft/presidio#give-it-a-try).

### Next Steps

In this post you learned two of my favorite options for detecting PII in your data with Azure. If you are interested in Azure and AI be sure to check out [my other posts](https://medium.com/@aribornstein) and the [Azure medium blog](https://medium.com/microsoftazure).

### About the Author

[**Aaron (Ari) Bornstein**](https://www.linkedin.com/in/aaron-ari-bornstein-22aa7a77/) is an AI researcher with a passion for history, engaging with new technologies and computational medicine. As an Open Source Engineer at Microsoft’s Cloud Developer Advocacy team, he collaborates with Israeli Hi-Tech Community, to solve real world problems with game changing technologies that are then documented, open sourced, and shared with the rest of the world.

* * *