Governance and Security1 / 5
A data engineer needs to access the Databricks REST API from a notebook. Which authentication method is recommended for automated production workloads?
CorrectIncorrect
Alex
OAuth M2M with service principals is Databricks' recommended authentication for automated production workloads. Service principals are non-human identities that generate short-lived OAuth tokens via the client credentials flow, eliminating risks of long-lived credentials. Distractor analysis: Cluster-scoped IAM roles control cluster resource access, not API authentication. Azure AD user tokens are tied to interactive user sessions, unsuitable for unattended automation. PATs in secret scopes are simpler but long-lived and user-bound—if the user leaves or the PAT leaks, the pipeline is compromised. Best practice: store OAuth credentials using dbutils.secrets.get(), never hardcode tokens. Ref: docs.databricks.com/en/dev-tools/auth/oauth-m2m
Sourcedocs.databricks.com
Follow-up answers are available in the app. Create a free account — no credit card required.
Question 1 of 5
Create a free account