Azure-Samples / modern-data-warehouse-dataops

DataOps for the Modern Data Warehouse on Microsoft Azure. https://aka.ms/mdw-dataops.
MIT License
570 stars 451 forks source link

Retrieve databricks PAT token not working on ubuntu linux #354

Closed dhangerkapil closed 3 years ago

dhangerkapil commented 3 years ago

Description

Retrieve databricks PAT token not working on ubuntu 18.04/20.04 linux. Th code is in deploy_infrastructure.sh for parking_sensors e2e use case. It can be same case with other samples.

Error is AADSTS50005: User tried to log in to a device from a platform (Unknown) that's currently not supported through Conditional Access policy. Supported device platforms are: iOS, Android, Mac, and Windows flavors. Trace ID: 3fd36b2b-9b6c-4dcd-b101-6caac26a0c00 Correlation ID: 2cb82e26-00c3-416d-9f0c-b6103d3d91c3 Timestamp: 2021-05-26 23:55:55Z

Expected Behavior

you should be able to get the global PAT token for databricks

Reproduce

Run the deploy_infrastructure.sh script or deploy the e2e parking sensors code on ubuntu 18.04/20.04 or run command az account get-access-token --resource 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d

Additional Context

Found a workaround for this. I used the command "az account get-access-token --resource 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d" on PowerShell and got the token from there. After that, I used that token as an environment variable on ubuntu.

devlace commented 3 years ago

Hi @dhangerkapil This looks like it is due to the Conditional Access Policy that your AD admin may have set on your tenant which is preventing retrieving a token from a Linux box. https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/concept-conditional-access-conditions