CustomDeviceCodeCallback

This property sets a delegate/callback to the application providing them the Azure SDK DeviceCodeInfo object.

Declaration

// C#
public Func<DeviceCodeInfo, Task> CustomDeviceCodeCallback { set; }

Exceptions

InvalidOperationException – if application tries to set this property once a connection is already opened using its encapsulating object.

Remarks

This property is used with Azure device code authentication flow.

This property facilitates ODP.NET applications to receive display device code, URL, and other device code parameters. The DeviceCodeInfo object encapsulates these parameters for Azure use. Applications may choose to display these details if needed in the application user interface.

If this property is not set when using Azure device code authentication, then ODP.NET displays the device code and URL on the application console.