Authentication

Connect Power Platform ToolBox to your Dataverse environments securely. This guide covers all authentication methods, security features, and best practices.

Authentication Methods

Power Platform ToolBox supports three authentication methods for connecting to Dataverse environments:

Best for: End users, interactive scenarios, MFA-enabled accounts

Interactive login uses Microsoft's OAuth 2.0 flow with the Microsoft Authentication Library (MSAL):

  1. Open the Connections panel Connections Panel
  2. Click "Add Connection" in the Connections panel Connections Panel
  3. Give your connection a name in Connection Name
  4. Enter your Environment URL (e.g. https://org.crm.dynamics.com)
  5. Ensure Authentication Type is set to Microsoft Login Prompt
  6. Click Add
  7. A browser window opens for Microsoft authentication Microsoft Login
  8. Sign in with your credentials (MFA supported)
  9. Grant consent when prompted.
  10. An Authentication Successful message appears in the browser. Authentication Success message
  11. Your connection is saved securely and is ready for use.
  12. You can manage your connections in the Connections Panel, including deletion.

Benefits:

  • Most secure method
  • Supports Multi-Factor Authentication (MFA)
  • Supports Conditional Access policies
  • No need to handle credentials
  • Automatic token refresh

OAuth App Registration

Best for: Automation, service principals, CI/CD pipelines, background processes

Use an Entra ID application registration with client credentials:

Prerequisites:

Register app in Entra ID:

  1. Go to Entra Portal and select App registrations
  2. Click "New registration" App Registration
  3. Provide an appropriate name such as PowerPlatformToolBox (or your choice)
  4. Select a supported account type: Choose an appropriate option. Recommended "Accounts in this organizational directory only"
  5. Leave Redirect URI blank
  6. Click "Register"

Configure API permissions:

  1. In your app registratin page, select API permissions App Registration API Permissin
  2. Select Add a permission
  3. Add "Dynamics CRM" App Registration Add Permission
  4. Select user_impersonation then Add permissions App Registration User Impersonation
  5. Select "Grant admin consent for [Your Tenant]" App Registration Grant Admin Consent
  6. Confirm by clicking Yes

Create client secret:

  1. Select Certificates & secrets App Registration Certificates & Secrets
  2. Click New client secret
  3. Provide a description (e.g. "PPTB Secret") App Registration Certificates & Secrets
  4. Select an expiration period, keep as short as possible
  5. Click Add
  6. Copy the secret value immediately, you won't be able to see it again App Registration Client Secret
  7. You will also need the Application (client) ID and Directory (tenant) ID from the app overview page. App Registration Client ID / Tenant ID

Configure App user in Dataverse:

  1. In Power Platform Admin Center, navigate to your environment
  2. Go to Users Power Platform Admin Users
  3. Select New app user & Add an app Power Platform Admin Add an app
  4. Search for and select your registered app Power Platform Admin Add an app screen 2
  5. Enter an appropriate business unit and select edit on the security roles.
  6. Assign necessary security roles. This should be as minimal as possible, particularly in production environments.
  7. Once complete, select Create

Configure Power Platform ToolBox:

  1. In Power Platform ToolBox, open the Connections panel and select Add PPTB Configure connection
  2. Configure an appropriate connection name
  3. Enter your Environment URL (e.g. https://org.crm.dynamics.com)
  4. Select Authentication Type: Client ID/Secret
  5. Enter the Client ID you saved earlier
  6. Enter the Client Secret you saved earlier
  7. Enter the Tenant ID you saved earlier
  8. Select Test, if all is correct you will see a success message
  9. Click Add to save the connection securely PPTB Configure connection

Benefits:

  • Suitable for automation
  • No interactive prompts
  • Service principal support
  • Fine-grained permissions

Username/Password

Best for: Development, testing, POC scenarios

Direct authentication with username and password:

Setup:

Environment URL: https://org.crm.dynamics.com
Auth Method: Username/Password
Username: user@domain.com
Password: your-password

Use this method only for:

  • Local development environments
  • Testing and proof-of-concepts
  • Environments without MFA requirements

Security Features

Encrypted Storage

All sensitive credentials are encrypted using OS-native secure storage:

  • macOS: Keychain
  • Windows: DPAPI (Data Protection API)
  • Linux: libsecret

Encrypted fields:

  • Client ID
  • Client Secret
  • Access Token
  • Refresh Token
  • Password

Automatic Migration

If you're upgrading from an older version:

  • Plain-text connections are automatically encrypted on first launch
  • No manual intervention required
  • Backwards compatible

Token Management

  • Access tokens automatically refreshed before expiration
  • Refresh tokens securely stored and rotated
  • Failed refresh triggers re-authentication
  • No plaintext token storage

Managing Connections

Add Connection

  1. Click "Add Connection" button
  2. Fill in connection details
  3. Select authentication method
  4. Click "Connect"
  5. Complete authentication flow

Edit Connection

  1. Right-click connection in list
  2. Select "Edit"
  3. Modify details (name, URL, etc.)
  4. Re-authenticate if changing credentials

Delete Connection

  1. Right-click connection in list
  2. Select "Delete"
  3. Confirm deletion
  4. Encrypted credentials are securely removed

Set Active Connection

  1. Click on a connection in the list
  2. Connection becomes active
  3. Tools use the active connection
  4. Active connection highlighted in UI

Multiple Connections

Some tools may require multiple connections to different Dataverse environments. Power Platform ToolBox supports managing and using multiple connections seamlessly.

If the tool is configured for multiple connections, a different connection screen will be displayed, allowing selection of both connections.

PPTB Configure multiple connections

Utilise the connect buttons on both sides of the pane to select the appropriate connections for each environment. Select confirm once both connections are connected to open the tool.

The footer will display both active connections for reference while using the tool. Appropriate colours for the environments will also be shown as a border for the tool to give a visual indication.

PPTB Configure multiple connections colours

Troubleshooting

Connection Failed

Symptom: "Failed to connect" error

Solutions:

  • Verify environment URL is correct
  • Check network connectivity
  • Ensure credentials are valid
  • Verify app registration permissions (OAuth)
  • Check MFA/Conditional Access policies

Token Expired

Symptom: "Unauthorized" or "Token expired" error

Solutions:

  • PPTB automatically refreshes tokens
  • If refresh fails, re-authenticate
  • Check refresh token is not revoked
  • Verify app registration is not disabled

MFA Required

Symptom: "MFA required" error with username/password

Solution:

  • Use Interactive Login instead
  • Username/password cannot bypass MFA
  • Configure OAuth app registration for automation

Insufficient Permissions

Symptom: "Access denied" or "Insufficient privileges"

Solutions:

  • Verify user has necessary security roles in Dataverse
  • Check app registration API permissions (OAuth)
  • Ensure admin consent granted for app permissions
  • Review Dataverse security settings

Best Practices

For End Users - Use Interactive Login - Enable MFA on your account - Don't share connections - Review active connections regularly

For Developers - Use OAuth for automation - Rotate client secrets regularly - Use service principals for CI/CD - Never commit credentials to code

For Administrators - Enforce MFA policies - Use Conditional Access - Review app registrations - Audit connection usage

Next Steps

Was this page helpful?