0
我試圖找到它是否有可能使用RegistryManager使它不註冊設備,如果證書的指紋已被其他設備使用。Azure物聯網RegistryManager,塊重複使用證書
_registryManager = RegistryManager.CreateFromConnectionString(_connectionString);
Microsoft.Azure.Devices.Device device;
try
{
Console.WriteLine("Registering Device using X.509 certificate for authentication");
device = await _registryManager.AddDeviceAsync(new Microsoft.Azure.Devices.Device(deviceId)
{
Authentication = new AuthenticationMechanism()
{
X509Thumbprint = new X509Thumbprint()
{
PrimaryThumbprint = certificate2.Thumbprint
}
}
}).ConfigureAwait(false);
}
所以,如果上面的代碼被調用,另一個設備有指紋,我希望它失敗。或者,我希望能夠查看所有現有的指紋,以便在註冊之前手動檢查。
我看不到通過RegistryManager執行此操作的任何方法。