Suhail, Because my Dev box is now set up with a local IIS-hosted CSU, it doesn't write to the event viewer. So I can't use that unfortunately.
Hana, your link seems to be for an actual device. The device it complains about is the login device set up under Retail and commerce > Channel setup> POS setup > Devices.
This device is activated and it passed validation. so the setup is fine and the setup of the register it is linked to is fine too. It didn't change. And if there was something wrong , the DB refresh that i did should have removed any wrong setup. I compared the setup with what is on my other Dev box that works, and it looks exactly the same. It's not information that usually change.
Judy, I compared the setup under the Identity providers with what is in Azure portal and it is all correct.
Looking at the Developer tools > concole tab, the GetEnvironmentConfigurationCommerceServiceRequest trigger succeeds. So it can read the environment configuration.
then it starts with the acquire token from the retail server resource id. It uses the URI as set up under commerce shared parameters > Identity providers where the identity provider is the Azure AD, the relying party is the application id of the Cloud POS as set up under app registration in Azure portal and the server resource id is the application id URI of the retail server as set up in Azure portal for the retail server app registration.
I checked the numbers multiple times and they are correct.
It finishes the acquire token step.
It does this twice. Then it starts with the device activation and do the acquire Token and finish acquire token again and then it gives the error:
DeviceAuthenticationProvider.acquireToken did not find a device token in the application stroage.
It said a database error occured.
Device Activation failed. Errors=[{"errorCode":"Microsoft_Dynamics_Commerce_Runtime_CriticalStorageError","message":"A database error has occurred."}]