Excel Add-In for SAS Xpt

Build 25.0.9434

Connecting to OneLake

Authenticating to OneLake

You can authenticate to OneLake via AzureAD user, Azure MSI, or Azure Service Principal.

AzureAD User

AuthScheme must be set to AzureAD in all user account flows.

Desktop Applications

CData provides an embedded OAuth application that simplifies OAuth desktop Authentication. Alternatively, you can create a custom OAuth application. See Creating a Custom OAuth App for information about creating custom applications and reasons for doing so.

Get and Refresh the OAuth Access Token

After setting the following, you are ready to connect:

  • OAuthClientId (custom applications only): Set this to the client Id assigned when you registered your app.
  • OAuthClientSecret (custom applications only): Set this to the client secret assigned when you registered your app.
  • CallbackURL (custom application only): Set this to the redirect URI defined when you registered your app. For example: http://localhost:33333
When you connect, the add-in opens the Microsoft identity platform's OAuth endpoint in your default browser. Log in and grant permissions to the application. The add-in refreshes the access token automatically when it expires.

Azure Service Principal

The authentication as an Azure Service Principal is handled via the OAuth Client Credentials flow. It does not involve direct user authentication. Instead, credentials are created for just the application itself. All tasks taken by the application are done without a default user context, but based on the assigned roles. The application access to the resources is controlled through the assigned roles' permissions.

Create an AzureAD App and an Azure Service Principal

When authenticating using an Azure Service Principal, you must create and register an Azure AD application with an Azure AD tenant. See Creating an Entra ID (Azure AD) Application for more details.

In your App Registration in portal.azure.com, navigate to API Permissions and select the Microsoft Graph permissions. There are two distinct sets of permissions: Delegated permissions and Application permissions. The permissions used during client credential authentication are under Application Permissions.

Assign a role to the application

To access resources in your subscription, you must assign a role to the application.

  1. Open the Subscriptions page by searching and selecting the Subscriptions service from the search bar.
  2. Select the subscription to assign the application to.
  3. Open the Access control (IAM) and select Add > Add role assignment to open the Add role assignment page.
  4. Select Owner as the role to assign to your created Azure AD app.
Complete the Authentication Choose whether to use a client secret or a certificate and follow the relevant steps below.

Client Secret

Set these connection properties:

Certificate

Set these connection properties:

You are now ready to connect. Authentication with client credentials takes place automatically like any other connection, except there is no window opened prompting the user. Because there is no user context, there is no need for a browser popup. Connections take place and are handled internally.

Azure MSI

If you are connecting from an Azure VM with permissions for Azure Data Lake Storage, set AuthScheme to AzureMSI.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434