[The AD RMS SDK leveraging functionality exposed by the client in Msdrm.dll is available for use in Windows Server 2008, Windows Vista, Windows Server 2008 R2, Windows 7, Windows Server 2012, and Windows 8. It may be altered or unavailable in subsequent versions. Instead, use Active Directory Rights Management Services SDK 2.1, which leverages functionality exposed by the client in Msipc.dll.]

A rights policy template is an XrML document that contains a predefined usage policy that can be applied to protect an item of content, thereby eliminating the need to manually define and apply policy. Templates can contain the following information:

  • A template name and description.
  • Users and groups that can be granted content licenses.
  • The rights and associated conditions granted to the users.
  • The content expiration policy.
  • A set of extended policies.
  • The template revocation policy.
  • A revocation list.
  • A revocation list refresh interval.
  • A public key file for the revocation list.

When publishing content, your application can apply a template to generate an issuance license more easily. Typically, templates are created by an administrator on the AD RMS server, stored in the configuration database, copied to a shared folder, and distributed from there by using Group Policy, Systems Management Server, or an out-of-band mechanism. Beginning with Windows Vista with Service Pack 1 (SP1) and Windows Server 2008, an in-band distribution mechanism that enables the client to automatically retrieve templates from the AD RMS server is also available.

The following example shows a rights policy template that, if applied to an item of content, grants anyone the VIEW right. To improve readability, the ellipsis (...) punctuation symbol replaces long values. For more information about the individual XML elements and attributes that make up a template, see XrML Elements.

<?xml version="1.0" ?> 
- <XrML xmlns="" version="1.2">
  - <BODY type="Microsoft Official Rights Template">
      - <OBJECT>
          <ID type="MS-GUID">{...}</ID> 
          <NAME>LCID 1033:
                NAME ReadOnly:
                DESCRIPTION Grants readonly access.;
    - <ISSUER>
      - <OBJECT type="MS-DRM-Server">
          <ID type="MS-GUID">{...}</ID> 
          <ADDRESS type="URL">HTTP://example.com:80/_wmcs</ADDRESS> 
      - <PUBLICKEY>
        - <PARAMETER name="public-exponent">
            <VALUE encoding="integer32">65537</VALUE> 
        - <PARAMETER name="modulus">
            <VALUE encoding="base64" size="1024">...</VALUE> 
      - <OBJECT type="Publishing-URL">
          <ID type="MS-GUID">{...}</ID> 
          <NAME>Publishing Point</NAME> 
          <ADDRESS type="URL">
    - <WORK>
      - <OBJECT>
          <ID type=""/> 
      - <RIGHTSGROUP name="Main-Rights">
        - <RIGHTSLIST>
          - <RIGHT name="OWNER">
            - <CONDITIONLIST>
              - <ACCESS>
                - <PRINCIPAL>
                  - <OBJECT>
                      <ID type="Internal">Owner</ID> 
          - <VIEW>
            - <CONDITIONLIST>
              - <ACCESS>
                - <PRINCIPAL>
                  - <OBJECT>
                      <ID type="Internal">ANYONE</ID> 
    - <DIGEST>
      - <PARAMETER name="codingtype">
          <VALUE encoding="string">surface-coding</VALUE> 
        <VALUE encoding="base64" size="160">...</VALUE> 
      <VALUE encoding="base64" size="1024">...</VALUE> 

Related topics

AD RMS Concepts
Creating an Issuance License