I am using C# and using the Microsoft.Azure.Devices.Provisioning.ClientProvisioningDeviceClient SDK and trying to set displayName during the call to RegisterAsync(ProvisioningRegistrationAdditionalData, CancellationToken).
I have:
var pnpPayload = new ProvisioningRegistrationAdditionalData
{
JsonData = $"{{ \"modelId\": \"{parameters.ModelId}\", \"displayName\": \"{parameters.DeviceName}\" }}",
};
return await pdc.RegisterAsync(pnpPayload, cancellationToken);
and the JsonData is:
"{ \"modelId\": \"dtmi:iotDevicesAnywhere:MfrAIUTModelIAA5Level_3o3;1\", \"displayName\": \"Test Device 1 - I90\" }"
but it is not setting the display name. What should be the structure of the JSON Data be?