Closed bastyuchenko closed 9 months ago
I'm not entirely sure why the documentation you linked is making this suggestion. I would advise you to just call provisioningDeviceClient.RegisterAsync(...)
again in cases like this.
The Device Registration Status Lookup API you are referencing is actually part of the provisioning service client and would require another locally saved connection string (a DPS instance level connection string) to execute which defeats the purpose of not caching the device's credentials.
I'll go ahead and close this thread since the question has been answered.
In the following documentation Devices that can't store a connection string Microsoft doesn't recommend to connect to Azure DPS each time a device return on-line. Instead, it is recommended to store an Azure IoT Hub assigned to the device by Azure DPS previously or use Device Registration Status Lookup API and re-connect to this Azure IoT Hub every time the device returns online.
How to use Device Registration Status Lookup API from Azure IoT SDK for .NET ?