https://learn.microsoft.com/en-us/information-protection/develop/overview
https://learn.microsoft.com/en-us/information-protection/develop/concept-apis-use-cases
https://learn.microsoft.com/en-us/information-protection/develop/quick-file-list-labels-cpp
as per refs above
The Microsoft Information Protection (MIP) SDK is used to interact with sensitivity labels from Microsoft's classification, labeling, and protection services. The MIP SDK exposes the labeling and protection services from the Office 365 Security and Compliance Center to third-party applications and services.
The MIP SDK is composed of three primary SDKs
- File SDK is an abstraction of both the Protection and Policy SDKs. It provides interfaces for reading labels from the service, applying labels to defined file types, and reading labels from those files. It will be used by any service or application where a supported file type is involved, labels must be read or written, or content must be protected or decrypted.
- Policy SDK (aka the Universal Policy Engine (UPE)) allows software developers to retrieve labeling policies for a specific user. It is used primarily by client applications, where the developer controls the interface and file format. It's also used when the only requirement is to retrieve user policy, and not label files directly.
- Protection SDK provides the ability for software developers to convert plaintext streams into rights-managed streams, and vice versa.
In the context of listing sensitivity labels using the File SDK, you can use the ListSensitivityLabels method of the FileEngine object.
// List sensitivity labels
cout << "\nSensitivity labels for your organization:\n";
auto labels = engine->ListSensitivityLabels();
for (const auto& label : labels)
{
cout << label->GetName() << " : " << label->GetId() << endl;
for (const auto& child : label->GetChildren())
{
cout << "-> " << child->GetName() << " : " << child->GetId() << endl;
}
}
system("pause");