Currently the Azure python libraries perform the default behavior of prompting a user to login at a URL and paste a code when the user isn't currently authenticated with Azure. This is convenient when running in the foreground, but may cause problems if dds is run in the background job and the token is expired. Look into ways to allow users to control this behavior.
Documentation for the DeviceCodeCredential is here: https://docs.microsoft.com/en-us/python/api/azure-identity/azure.identity.devicecodecredential?view=azure-python