# How to Use the SAS Java Metadata Authorization Interface

standard usage

- Example 1: Obtaining the MdAuthorizationUtil Interface
- Example 2: Getting the Identity List for permissions set on an object
- Example 3: Getting the MdPermissionInfo List for a single identity
- Example 4: Getting the MdAuthorizationInfo List for multiple identities
- Example 5: Setting the MdPermissionInfo List for a single identity
- Example 6: Setting the MdAuthorizationInfo List for multiple identities

## Example 1: Obtaining the MdAuthorizationUtil Interface

This is an example of how to get the MdAuthorizationUtil interface for a SAS Java CMetadata object. The MdAuthorizationUtil interface provides object-level authorization management methods.

         try
         {
            CMetadata object;  // any SAS CMetadata object type will work here (your code must fill this in)
            MdAuthorizationUtil authUtil = object.getAuthorizationUtil();
         }
         catch (MdException e)
         {
            e.printStackTrace();
         }
         catch (RemoteException e)
         {
            e.printStackTrace();
         }