Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Wrong Error message when connecting to an unauthorized instance when using a client_secret #1330

Closed
chkeita opened this issue Oct 5, 2021 · 0 comments · Fixed by #1376
Closed
Assignees
Labels
bug Something isn't working

Comments

@chkeita
Copy link
Contributor

chkeita commented Oct 5, 2021

Information

  • Onefuzz version: any
  • OS: 3.1.0

Provide detailed reproduction steps (if any)

  1. Deploy a new instance of OneFuzz
  2. create a new cli registration with python registration.py create_cli_registration <instance> <subscription>
  3. update the config with the new client_id and secret onefuzz config --client_id <client_id> --client_secret <secret>
  4. In the azure portal Azure Active Directory >> Enterprise Application >> <registration_name> > Prperties
    set User assignment required? to true
  5. run onefuzz info get

Expected result

An error message saying that the user or application cannot connect to the instance because it does not have a role

Actual result

The error message mentions an invalid resource

(venv) C:\temp\onefuzz> onefuzz login
WARNING:nsv-backend:failed to get access token with scope https://<>/.default
ERROR:cli:command failed: error: invalid_resource
'AADSTS500011: The resource principal named https://<>.azurewebsites.net was not found in the tenant named Microsoft. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.
Trace ID: aa3e27e2-c58b-4792-903f-45ddc8805600
Correlation ID: 46537caa-7a45-4f33-aaa0-7ee7e4a3d413
Timestamp: 2021-10-04 22:01:19Z'
@chkeita chkeita added the bug Something isn't working label Oct 5, 2021
@ghost ghost added the Needs: triage label Oct 5, 2021
@mgreisen mgreisen assigned mgreisen and chkeita and unassigned mgreisen Oct 7, 2021
@chkeita chkeita linked a pull request Oct 25, 2021 that will close this issue
@ghost ghost locked as resolved and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants