If the client application needs to leave a domain, it invokes the
DRMManager.removeFromDeviceGroup()ActionScript API or the
leaveLicenseDomain() iOS API to initiate the domain de-registration process. Domain de-registration is a two phase process. The client first sends a de-registration preview request. The domain server examines the request and determines whether the client is permitted to leave the domain. An error may be returned if the machine is not currently part of the domain. Upon a successful response, the client deletes its domain credentials and any licenses that have been issued to that domain. It then sends a de-registration request.
When processing domain de-registration requests, the server uses
getRequestPhase() to determine whether the client is in the preview or de-registration phase. In the preview phase, the domain server examines the request and determines whether the client is permitted to leave the domain because the request may be denied; for example, the request may be denied if the machine is not currently part of the domain. In the de-registration phase, the server records the fact that the machine has left the domain. The server is highly recommended to evaluate the same logic in the preview request as in the actual de-registration request to minimize the chance of the second phase failing.