v2026.1 Open Portal ↗
On this page

Authentication Issues

Diagnostic Overview

Authentication issues in StackFlow can originate from three layers: the Cognito User Pool, the Azure AD OBO exchange, or the LDAP connector. Start diagnostics by checking the StackFlow audit log in Admin → Security → Audit Log, then cross-reference with CloudWatch Logs for the StackFlowAPI Lambda and the Cognito User Pool logs.

⚙️ Minimum Requirements
  • CloudWatch Logs: /aws/lambda/StackFlowAPI log group accessible for auth error investigation
  • Cognito: Admin access to pool us-east-1_WKK1AVJ2m for user account investigation
  • CloudTrail: stackflow-cloudtrail-373544523367 accessible for authentication event audit
  • Secrets Manager: Read access to stackflow/azure-sso/client-secret and stackflow/ldap/bind-credentials for credential validation
CloudWatch Log Groups:
API Logs: /aws/lambda/StackFlowAPI
Cognito Logs: /aws/cognito/userpools/us-east-1_WKK1AVJ2m
OBO Lambda: /aws/apigateway/606pvqo245/obo

Common Issues

SymptomLikely CauseDiagnostic StepResolution
Login page spins, no redirectCognito callback URL not registeredCheck browser console for CORS errorAdd redirect URI to Cognito app client
"User not found" on valid emailUser created in wrong Cognito poolaws cognito-idp admin-get-user --user-pool-id us-east-1_WKK1AVJ2m --username user@example.comCreate user in correct pool
"Token expired" errors after 1hRefresh token rotation failingCheck browser localStorage for refresh_tokenClear browser storage, re-authenticate
MFA setup page loopsTOTP QR code generation errorCheck StackFlowAPI Lambda logs for associateSoftwareToken errorsEnsure Cognito TOTP MFA is enabled for the pool
403 after loginUser has no role assigned (custom:role empty)Check Cognito user attributes in consoleSet custom:role attribute via admin-update-user-attributes

SSO & OBO Issues

SymptomLikely CauseDiagnostic StepResolution
Azure SSO redirects back to Azure login loopAzure app registration redirect URI mismatchCheck Azure AD app registration redirect URIsAdd exact redirect URI to Azure app registration
OBO exchange returns 401Azure app client secret expiredCheck Azure app registration certificate/secret expiryRotate Azure client secret, update Secrets Manager
OBO exchange returns 403Azure consent not granted for GroupMember.Read.AllCheck Azure app API permissions — look for "Requires admin consent"Grant admin consent in Azure Portal
Wrong groups syncedGroup mapping configuration mismatchCheck group mapping in Admin → Authentication → Azure ADUpdate group name/ID in StackFlow group mapping

LDAP Issues

SymptomLikely CauseDiagnostic StepResolution
LDAP bind failsWrong bind DN or passwordTest with ldapsearch from VPC bastionVerify bind DN format and reset service account password
Users authenticate but no groups syncBind account lacks memberOf read accessCheck AD delegation for service account on user OUGrant service account "Read memberOf" permission
Connection timeoutLDAP port not accessible from Lambda SGCheck SG rules for sg-0ada825cda6a75ed6 outbound to LDAP portAdd outbound rule: TCP 636 to LDAP server IP

Cognito Issues

# Check Cognito user pool for login errors
aws logs filter-log-events   --log-group-name /aws/cognito/userpools/us-east-1_WKK1AVJ2m   --filter-pattern "ERROR"   --start-time $(date -d '1 hour ago' +%s000)   --region us-east-1

# Check if Cognito Lambda triggers are causing failures
aws cognito-idp describe-user-pool   --user-pool-id us-east-1_WKK1AVJ2m   --region us-east-1 | jq '.UserPool.LambdaConfig'

# Verify all trigger Lambdas are warm (cold starts can cause trigger timeouts)
aws lambda get-function-concurrency   --function-name StackFlowAPI   --region us-east-1