title: Encountering sign in errors due to conditional access policy from AzureAD while enabling replication for Azure VM from automated opened chrome browser
body: <p>While chrome browser open by selenium and try to execute Enable replication in Azure portal, it throws &quot;Conditional Access Failure&quot; pop-up and asking for sing in again. After clicking on Sign in again, it throws the following &quot;Device state: Unregistered&quot;. By my device is registered in Azure, and it is working in a regular chrome browser, it is not working only when the chrome browser open by automation code(We are using selenium).</p>
  <p>In Azure AD,</p>
  <p>Sign-in error code: 53000
  Failure reason: Device is not in required device state: {state}. Conditional Access policy requires a compliant device, and the device is not compliant. The user must enroll their device with an approved MDM provider like Intune.</p>
  <p>Additional Details: Your administrator might have configured a conditional access policy that allows access to your organization's resources only from compliant devices. To be compliant, your device must be either joined to your on-premises Active Directory or joined to your Azure Active Directory.            More details available at <a href="https://docs.microsoft.com/azure/active-directory/active-directory-conditional-access-device-remediation" rel="nofollow noreferrer">https://docs.microsoft.com/azure/active-directory/active-directory-conditional-access-device-remediation</a>
  Troubleshooting compliance error messages for a work or school account</p>
  <p><a href="https://i.stack.imgur.com/D4zhN.png" rel="nofollow noreferrer">enter image description here</a></p>