4.1.2 Phase 2: Client Downloads Policy from Server
In this phase, the client downloads the policy from the server and receives a temporary policy key through the PolicyKey element (section 2.2.2.42). The client then uses the policy key to acknowledge the policy and obtain a key that enables the client to successfully execute protocol commands against the server. On this initial request, the client also supplies a settings:DeviceInformation element (section 2.2.2.53) that describes the device.
Request
-
POST /Microsoft-Server-ActiveSync?User=deviceuser&DeviceId=6F24CAD599A5BF1A690246B8C68FAE8D&DeviceType=PocketPC&Cmd=Provision HTTP/1.1 Accept-Language: en-us MS-ASProtocolVersion: 14.0 Content-Type: application/vnd.ms-sync.wbxml X-MS-PolicyKey: 0 User-Agent: ASOM Host: EXCH-B-003 <?xml version="1.0" encoding="utf-8"?> <Provision xmlns="Provision:" xmlns:settings="Settings:"> <settings:DeviceInformation> <settings:Set> <settings:Model>...</settings:Model> <settings:IMEI>...</settings:IMEI> <settings:FriendlyName>...</settings:FriendlyName> <settings:OS>...</settings:OS> <settings:OSLanguage>...</settings:OSLanguage> <settings:PhoneNumber>...</settings:PhoneNumber> <settings:MobileOperator>...</settings:MobileOperator> <settings:UserAgent>...</settings:UserAgent> </settings:Set> </settings:DeviceInformation> <Policies> <Policy> <PolicyType>MS-EAS-Provisioning-WBXML</PolicyType> </Policy> </Policies> </Provision>
Response
-
HTTP/1.1 200 OK Connection: Keep-Alive Content-Length: 1069 Date: Mon, 01 May 2006 20:15:15 GMT Content-Type: application/vnd.ms-sync.wbxml Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 MS-Server-ActiveSync: 8.0 Cache-Control: private <?xml version="1.0" encoding="utf-8"?> <Provision xmlns="Provision:" xmlns:settings="Settings:"> <settings:DeviceInformation> <settings:Status>1</settings:Status> </settings:DeviceInformation> <Policies> <Policy> <PolicyType>MS-EAS-Provisioning-WBXML</PolicyType> <Status>1</Status> <PolicyKey>1307199584</PolicyKey> <Data> <EASProvisionDoc> <DevicePasswordEnabled>1</DevicePasswordEnabled> <AlphanumericDevicePasswordRequired>1</AlphanumericDevicePasswordRequired> <PasswordRecoveryEnabled>1</PasswordRecoveryEnabled> <RequireStorageCardEncryption>1</RequireStorageCardEncryption> <AttachmentsEnabled>1</AttachmentsEnabled> <MinDevicePasswordLength/> <MaxInactivityTimeDeviceLock>333</MaxInactivityTimeDeviceLock> <MaxDevicePasswordFailedAttempts>8</MaxDevicePasswordFailedAttempts> <MaxAttachmentSize/> <AllowSimpleDevicePassword>0</AllowSimpleDevicePassword> <DevicePasswordExpiration/> <DevicePasswordHistory>0</DevicePasswordHistory> </EASProvisionDoc> </Data> </Policy> </Policies> </Provision>