The Microsoft Data Factory MCP Server supports multiple authentication methods for Azure AD integration.
Authentication is required to access Microsoft Fabric and Azure Data Factory services. The server supports two primary authentication flows:
- Interactive Authentication - User-based authentication with browser flow
- Service Principal Authentication - Application-based authentication with client credentials
Interactive authentication uses the device code flow or browser-based authentication to obtain user credentials.
authenticate_interactive
This method will:
- Open a browser window or provide a device code
- Prompt you to sign in with your Azure AD credentials
- Store the authentication token for subsequent requests
- Valid Azure AD user account
- Access to a web browser (for browser flow)
- Appropriate permissions to access Data Factory resources
Service principal authentication uses application credentials (client ID and client secret) for automated scenarios.
-
Create an Azure AD Application:
- Navigate to Azure Portal > Azure Active Directory > App registrations
- Click "New registration"
- Provide a name and configure settings
- Note the Application (client) ID
-
Create a Client Secret:
- In your app registration, go to "Certificates & secrets"
- Click "New client secret"
- Copy the secret value (it won't be shown again)
-
Grant Permissions:
- In your app registration, go to "API permissions"
- Add the following Microsoft Graph permissions:
Gateway.Read.All(for read-only access)Gateway.ReadWrite.All(for full access)
- Grant admin consent for the permissions
authenticate_service_principal(
applicationId: "your-app-client-id",
clientSecret: "your-client-secret",
tenantId: "your-tenant-id" // optional
)
applicationId(required): The Application (client) ID from your Azure AD app registrationclientSecret(required): The client secret valuetenantId(optional): The Azure AD tenant ID. If not provided, will use the default tenant
get_authentication_status
Returns information about the current authentication state, including:
- Whether the user is authenticated
- Authentication method used
- Token expiration information
- User/application details
get_access_token
Retrieves the current access token for making authenticated requests. Useful for debugging or manual API calls.
sign_out
Clears the current authentication state and removes stored tokens.
# Simple interactive login
> authenticate with Azure AD
# The system will open a browser or provide a device code for authentication
# Authenticate with service principal
> authenticate using service principal with client ID abc123 and secret xyz789
# With explicit tenant ID
> authenticate using service principal with client ID abc123, secret xyz789, and tenant def456
# Check current authentication status
> get authentication status
# Get access token for debugging
> get access token
# Sign out
> sign out