CData Python Connector for Azure Data Lake Storage

Build 22.0.8326

Creating a Custom OAuth App

Creating a custom OAuth app and a service principal that can access the necessary resources is required when authenticating using an Azure Service Principal.

Follow the steps below to create a custom OAuth app and obtain the connection properties for the Azure Service Principal authentication.

Steps to Create a Custom OAuth App

Follow the steps below to obtain the OAuth values for your app.

  1. Log in to https://portal.azure.com.
  2. In the left-hand navigation pane, select Azure Active Directory then App Registrations and click on New registration button.
  3. Enter an app name and set the radio button for "Any Azure AD Directory - Multi Tenant". Then set the redirect url to something such as http://localhost:33333, the provider's default.
  4. Copy the Application (client) Id value displayed on the Overview section after creating the app, since this value is used as the OAuthClientId
  5. Define the app authentication type by going to the Certificates & Secrets section. There are two types of authentication available: using a client secret and using a certificate. The recommended authentication method is via a certificate, but you can also create an application secret.
    • Option 1 - Upload a certificate: In the Certificates & Secrets section, select Upload certificate and select the certificate to upload from your local machine.
    • Option 2 - Create a new application secret: In the Certificates & Secrets section, select New Client Secret for the app and select its duration. After saving the client secret, the key value is displayed. Copy this value as it is displayed only once, and it is used as the OAuthClientSecret.
  6. In the Authentication tab, make sure to check the option: Access tokens (used for implicit flows).
  7. Open the Subscriptions page by searching and selecting the Subscriptions service from the search bar.
  8. Select the particular subscription to assign the application to, then open the Access control (IAM) section, and click on the Add role assignment button.
  9. Set the role to assign to your created OAuth app. Select the Owner role for the ADLSGen1 Schema, and the Storage Blob Data Contributor role for the ADLSGen2 Schema. Alternatively, you can also grant access rights by assigning ACLs (Access control lists) to your service principal.

Copyright (c) 2022 CData Software, Inc. - All rights reserved.
Build 22.0.8326