microsoft / accessibility-insights-service

Accessibility Insights Service
Other
70 stars 51 forks source link

[Bug] service account authentication failure for crawling urls #2569

Closed v-viyada closed 1 month ago

v-viyada commented 1 month ago

Describe the bug

accessibility insights scan is failing to scan url using service account authentication and giving error message Authentication failed. Authentication requires a non-people service account. To learn how to set up a service account, visit: https://aka.ms/AI-action-auth. TargetCloseError: Waiting for selector #FormsAuthentication

This is used to run fine earlier with same service account and there is no change in service account password as well.

Area

Crawler package and may be scanner global library

To Reproduce

Steps to reproduce the behavior:

  1. Build cli package
  2. Run below command node ./node_modules/accessibility-insights-scan/dist/ai-scan-cli.js --url --authType AAD --serviceAccountName --serviceAccountPassword --restart --silentMode false --crawl true --maxUrls 1

Expected behavior

Service account authentication should succeed and scan the URL

Log files

Screenshots

Additional context

Investigate the issue and after inputting service account and hit enter, the code waits for selector #FormsAuthentication. If the selector does not load it gives the error mentioned in bug description. I observed that for some service account, authentication flow skips the intermediate page popup to choose password or passkey