1. Home
  2. Knowledge Base
  3. SureMDM
  4. General questions
  5. How to counter Error: 0x1297 on SureMDM OnPremise?
  1. Home
  2. Knowledge Base
  3. SureMDM
  4. How to counter Error: 0x1297 on SureMDM OnPremise?

How to counter Error: 0x1297 on SureMDM OnPremise?

Sometimes while device provisioning to SureMDM On-Premise, we might encounter Error 0x1297 token is empty. 

This error pops up when there are issues with the creation of the Play for Work account while adding device(s) to SureMDM in Android Enterprise mode.

One of the basic pointers to verify when this happens is to check the APIAuthenticationToken value in the API web config file and pluto web config file. The value should be the same in both places.

Below are the step to check APIAuthenticationToken Value

1. Run the below command in DB to get the GUID.

SELECT NEWID();

2. Navigate to C:\inetpub\wwwroot\api or C:\inetpub\wwwroot\suremdm\api  path and replace the obtained GUID in the below web config file of the  API folder. 

<add key="AfwPubSubApiKey" value= "<Input the GUID> " />

​3. Navigate to C:\Program Files\42Gears\AfwPubSubInstaller\AfwPubSubService.exe.config to make the necessary changes as suggested below. ​

i. Enter the GUID obtained from Step 1 for APIAuthenticationToken in the below tag:

<add key="APIAuthenticationToken" value= "<Input GUID>" />

ii. Enter the On-premise server URL without the mention of https in the tag:

<add key="MainServerUrl" value= "<Server URL>" />

iii. Verify the Driver value, Server details, Database Username, and Password in MainDBConnectionString as mentioned in the below tag:

 <add key="MainDBConnectionString" value= “ ”>

Note: Driver value, Server details, Database Username, and Password should be the same as API web config file (C:\inetpub\wwwroot\api).

      4. Restart AfwPubSubService from the Task Manager.

Note: Ensure AfwPubSubApiKey and APIAuthenticationToken should have the same GUID which was obtained from Step 1.

For more details on our products, click here

Was this helpful?
YesNo
Updated on June 2021