How to: Use document tracking
Important
Versions of the Microsoft Rights Management Service SDK released prior to March 2020 are deprecated; applications using earlier versions must be updated to use the March 2020 release. For full details, see the deprecation notice.
No further enhancements are planned for the Microsoft Rights Management Service SDK. We strongly recommend adoption of the Microsoft Information Protection SDK for classification, labeling, and protection services.
Using the document tracking feature requires some simple understandings about managing the associated metadata and registration with the service.
Managing document tracking metadata
Each of the operating systems supporting document tracking have similar implementations. These include as set of properties that represent the metadata, a new parameter added to the user policy creation methods and a method for registering the policy to be tracked with the document tracking service.
Operationally, only the content name and the notification type properties are required for document tracking.
The sequence of steps you will use to setup document tracking for a given piece of content is:
- Create a license metadata object then set the content name and notification type. These are the only required properties.
- Android - LicenseMetadata
- iOS - MSLicenseMetadata
Chose policy type; template or ad-hoc:
For template based document tracking, create a user policy object passing the license metadata as a parameter.
- Android - UserPolicy.create
- iOS - MSUserPolicy.userPolicyWithTemplateDescriptor
For ad-hoc based document tracking, set the license metadata property on the policy descriptor object.
Android - PolicyDescriptor.setLicenseMetadata
iOS - MSPolicyDescriptor.licenseMetadata.
Note The license metadata object is only directly accessible during the process of setting up document tracking for the given user policy. Once the user policy object is created, the associated license metadata is not accessible i.e. changing the values of license metadata has no effect.
Finally, call the platform registration method for document tracking