Troubleshooting
Troubleshooting
Solutions to common problems and error messages.
Profile Issues
“Profile not found”
Error:
Error: Profile 'my-profile' not foundCause: Profile name is incorrect or doesn’t exist.
Solution:
| |
“Profile already exists”
Error:
Error: Profile 'my-profile' already existsCause: Attempting to create a profile with a duplicate name.
Solution:
| |
“Invalid profile configuration”
Error:
Error: Failed to load profiles.json
Invalid JSON formatCause: Corrupted profiles.json file.
Solution:
| |
“Cannot access secure storage”
Error:
Error: Failed to access secure storagePlatform-specific causes and solutions:
Windows:
- Cause: User profile corrupted
- Solution: Run
sfc /scannowas administrator
macOS:
- Cause: Keychain is locked
- Solution:
- Open Keychain Access app
- Select “login” keychain
- Unlock with your password
Linux:
- Cause: File permissions on
~/.entratool/directory - Solution:
1 2chmod 700 ~/.entratool chmod 600 ~/.entratool/*
Authentication Failures
“AADSTS70011: Invalid scope”
Error:
AADSTS70011: The provided value for the input parameter 'scope' is not valid.Cause: Requested scope is not configured in app registration or has incorrect format.
Solutions:
1. Check scope format:
| |
2. Add permission in Azure Portal:
- Go to Azure Portal
- Navigate to Azure Active Directory → App registrations
- Select your application
- Click “API permissions”
- Click “Add a permission”
- Select the API (e.g., Microsoft Graph)
- Select the required permission
- Click “Grant admin consent” (if needed)
“AADSTS7000215: Invalid client secret”
Error:
AADSTS7000215: Invalid client secret provided.Cause: Client secret is expired, incorrect, or not properly stored.
Solutions:
1. Check secret expiration in Azure Portal:
- App registrations → Your app → Certificates & secrets
- Check “Client secrets” section for expiration date
2. Rotate secret:
| |
3. Verify secret was stored correctly:
| |
“AADSTS50057: Application is disabled”
Error:
AADSTS50057: The application is currently disabled.Cause: App registration is disabled in Azure Portal.
Solution:
- Go to Azure Portal → App registrations
- Select your application
- If disabled, contact your administrator to re-enable it
“AADSTS65001: User consent required”
Error:
AADSTS65001: The user or administrator has not consented to use the application.Cause: User hasn’t consented to delegated permissions.
Solution:
Option 1: Use interactive flow to consent:
| |
Option 2: Admin grants consent in Azure Portal:
- App registrations → Your app → API permissions
- Click “Grant admin consent for [Tenant]”
- Click “Yes”
“AADSTS65002: Consent required for required scopes”
Error:
AADSTS65002: Consent between first party application and first party resource must be configured via preauthorization.Cause: Requesting scopes that require admin consent but using user-interactive flow.
Solution:
- Have admin grant consent in Azure Portal
- Or use Client Credentials flow with Application permissions
“AADSTS700016: Application not found”
Error:
AADSTS700016: Application with identifier '...' was not found in the directory.Cause: Client ID is incorrect or app registration doesn’t exist in the specified tenant.
Solutions:
1. Verify Client ID:
| |
2. Verify Tenant ID:
- Ensure you’re using the correct tenant ID
- For multi-tenant apps, try
commoninstead of specific tenant ID
3. Check app registration exists:
- Azure Portal → Azure Active Directory → App registrations
- Verify app exists and note the correct Application (client) ID
Token Problems
“Token expired”
Error:
Error: Token has expired
HTTP 401 UnauthorizedCause: Access token lifetime exceeded (typically 1 hour).
Solutions:
1. Get fresh token:
| |
2. Use refresh token (if available):
| |
3. Implement automatic refresh:
| |
“Invalid token format”
Error:
Error: Token is not a valid JWTCause: Token string is malformed or corrupted.
Solutions:
1. Check for whitespace or newlines:
| |
2. Verify token structure:
| |
3. Regenerate token:
| |
“Invalid audience”
Error:
Error: Token audience does not match
HTTP 401 UnauthorizedCause: Token was issued for a different API than you’re calling.
Solution:
1. Check token audience:
| |
2. Request token with correct scope:
| |
Permission Errors
“Insufficient privileges”
Error:
Error: Insufficient privileges to complete the operation
HTTP 403 ForbiddenCause: Token has the scope but user/app lacks the underlying permission.
Solutions:
For users:
- Verify user has appropriate Azure AD role:
- Azure Portal → Azure Active Directory → Users
- Select user → Assigned roles
- Assign required role (e.g., Global Reader, User Administrator)
For service principals:
- Grant admin consent for Application permissions:
- Azure Portal → App registrations → Your app → API permissions
- Check “Status” column shows “Granted”
- If not, click “Grant admin consent”
2. Check token claims:
| |
“AADSTS50105: Not assigned to a role”
Error:
AADSTS50105: The signed in user is not assigned to a role for the application.Cause: User is not assigned to the application (when assignment is required).
Solution:
- Azure Portal → Enterprise applications → Your app
- Click “Users and groups”
- Click “Add user/group”
- Select user and assign role
- Click “Assign”
“AADSTS50076: MFA required”
Error:
AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access.Cause: Multi-factor authentication is required by conditional access policy.
Solution:
- Use interactive flow (Interactive Browser or Device Code)
- User will be prompted for MFA during authentication
- Client Credentials flow cannot satisfy MFA requirements (use certificate or Managed Identity)
Certificate Issues
“Certificate not found”
Error:
Error: Certificate file not found: /path/to/cert.pfxCause: Certificate path is incorrect or file doesn’t exist.
Solution:
1. Verify path:
| |
2. Update profile with correct path:
| |
“Invalid certificate password”
Error:
Error: The specified password is incorrectCause: Certificate password is incorrect.
Solution:
1. Update password:
| |
2. Verify certificate manually:
| |
“Certificate expired”
Error:
Error: Certificate has expired
AADSTS700027: Client assertion contains an invalid signature.Cause: Certificate has passed its expiration date.
Solution:
1. Check certificate expiration:
| |
2. Generate new certificate:
| |
3. Update app registration:
- Azure Portal → App registrations → Your app
- Certificates & secrets → Certificates → Upload
- Upload new certificate
4. Update profile:
| |
Network Issues
“Connection timeout”
Error:
Error: Connection timed out
Failed to connect to login.microsoftonline.comCause: Network connectivity issue or firewall blocking.
Solutions:
1. Check internet connectivity:
| |
2. Check firewall rules:
- Ensure outbound HTTPS (443) is allowed
- Check corporate proxy settings
3. Configure proxy (if needed):
| |
“SSL/TLS error”
Error:
Error: SSL certificate problem: unable to get local issuer certificateCause: SSL/TLS certificate validation failure.
Solutions:
1. Update CA certificates:
| |
2. Corporate proxy with SSL inspection:
| |
Flow-Specific Issues
Device Code: “Code expired”
Error:
Error: Device code expiredCause: User didn’t authenticate within the time limit (typically 15 minutes).
Solution:
| |
Interactive Browser: “Redirect URI mismatch”
Error:
AADSTS50011: The redirect URI specified in the request does not match the redirect URIs configured for the application.Cause: Localhost redirect URI not configured in app registration.
Solution:
- Azure Portal → App registrations → Your app
- Authentication → Add a platform → Web
- Add redirect URI:
http://localhost:8080 - Save
Try:
| |
“Browser did not respond”
Error:
Error: Browser authentication timed outCause: Browser didn’t complete authentication or localhost port blocked.
Solutions:
1. Try Device Code flow instead:
| |
2. Check localhost is not blocked:
| |
3. Try different port (if configurable):
| |
Platform-Specific Issues
Linux: “Secrets not secure”
Warning:
Warning: Linux storage uses XOR obfuscation (not secure)Cause: Linux lacks universal secure storage.
Recommendations:
1. Use certificate authentication:
| |
2. Use environment variables:
| |
3. Use external secret manager:
| |
macOS: “Operation not permitted”
Error:
Error: Keychain operation not permittedCause: Keychain is locked or application needs permission.
Solution:
- Open Keychain Access app
- Unlock “login” keychain
- Try again
Windows: “DPAPI error”
Error:
Error: Failed to protect data using DPAPICause: User profile issue.
Solution:
- Check user profile integrity
- Run
sfc /scannowas administrator - If problem persists, create new Windows user profile
Diagnostic Commands
Check Tool Version
| |
Verify Profile Configuration
| |
Test Token Generation
| |
Inspect Token
| |
Check Token Validity
| |
Getting Help
Enable Verbose Output
| |
Check Logs
Location:
- Windows:
%TEMP%\entratool\ - macOS/Linux:
/tmp/entratool/
Report Issues
Include:
- Tool version:
entratool --version - Platform: Windows/macOS/Linux
- Error message (redact sensitive info)
- Steps to reproduce