Databricks.API.PowerShell icon indicating copy to clipboard operation
Databricks.API.PowerShell copied to clipboard

Set-DatabricksEnvironment using AAD Username/password?

Open saldroubi opened this issue 3 years ago • 1 comments

I am trying to setup the environment using username/password but I am confused about the client id? In you example on https://github.com/gbrueckl/Databricks.API.PowerShell#azure-active-directory-aad-usernamepassword You set client id as so:

$clientId = 'db00e35e-1111-2222-3333-c8cc85e6f524'

What is this referring to? I this the service principal client id or is the the actual AD user client id. I am not sure how to get this for a use. What if I am not using a service principal/App? Is the client ID same as object ID of an AAD user? Is there a way to get the client ID using PowerShell?

Thank you.

saldroubi avatar May 11 '22 19:05 saldroubi

for username/password authentication to work you first need to create an app registration in your AAD tenant as described here: https://docs.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/aad/app-aad-token#configure-an-app-in-azure-portal which will also provide the client_id to you

gbrueckl avatar May 12 '22 06:05 gbrueckl

I am using "-UsingAzContext" option which you added implemented and it is working fine for my needs.

Thank you.

saldroubi avatar Oct 20 '22 14:10 saldroubi

for later reference, i guess this is what you were looking for: https://github.com/gbrueckl/Databricks.API.PowerShell#azure-active-directory-aad-usernamepassword

gbrueckl avatar Oct 20 '22 15:10 gbrueckl