Power-Maverick / DataverseDevTools-VSCode

The all-in-one tool to develop code for Dataverse/Dynamics 365. Helps you connect to a Dataverse environment, generate TypeScript definitions for entities, create a different type of Dataverse-specific projects, and much more.
https://marketplace.visualstudio.com/items?itemName=danish-naglekar.dataverse-devtools
MIT License
55 stars 15 forks source link

[Bug]: Microsoft Login Prompt Fails #127

Closed SescoEnvDev closed 1 year ago

SescoEnvDev commented 1 year ago

What happened?

Attempting to log in with the "Microsoft Login Prompt" option fails. See log info below.

What version of the tool are you using?

v2.1.4

What version of Visual Studio Code are you running?

1.81.0

Any relevant session id from VSCode?

ea3aef58-532a-4e53-9ca8-abfff76c895a1691676941237

Relevant log output

Error occured in connectDataverse command. 
Error code: undefined. 
Error message: unauthorized_client: 700016 - [2023-08-10 16:42:25Z]: AADSTS700016: Application with identifier '1cab452e-c5f4-4fc9-8efb-28d54031db71' was not found in the directory 'SESCO LLC'. 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 may have sent your authentication request to the wrong tenant.
Trace ID: 08f98f6a-3e9c-4a71-88c4-b1e07e5bcf00
Correlation ID: 8521dccc-820f-4df9-92f9-371093750b41
Timestamp: 2023-08-10 16:42:25Z - Correlation ID: 8521dccc-820f-4df9-92f9-371093750b41 - Trace ID: 08f98f6a-3e9c-4a71-88c4-b1e07e5bcf00. 
Error stack: ServerError: unauthorized_client: 700016 - [2023-08-10 16:42:25Z]: AADSTS700016: Application with identifier '1cab452e-c5f4-4fc9-8efb-28d54031db71' was not found in the directory 'SESCO LLC'. 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 may have sent your authentication request to the wrong tenant.
Trace ID: 08f98f6a-3e9c-4a71-88c4-b1e07e5bcf00
Correlation ID: 8521dccc-820f-4df9-92f9-371093750b41
Timestamp: 2023-08-10 16:42:25Z - Correlation ID: 8521dccc-820f-4df9-92f9-371093750b41 - Trace ID: 08f98f6a-3e9c-4a71-88c4-b1e07e5bcf00
    at ServerError.AuthError [as constructor] (\node_modules\@azure\msal-common\dist\index.cjs.js:514:24)
    at new ServerError (\node_modules\@azure\msal-common\dist\index.cjs.js:3338:28)
    at ResponseHandler.validateTokenResponse (\node_modules\@azure\msal-common\dist\index.cjs.js:4976:19)
    at ClientCredentialClient.<anonymous> (\node_modules\@azure\msal-common\dist\index.cjs.js:6404:41)
    at step (\node_modules\@azure\msal-common\dist\index.cjs.js:79:23)
    at Object.next (\node_modules\@azure\msal-common\dist\index.cjs.js:60:53)
    at fulfilled (\node_modules\@azure\msal-common\dist\index.cjs.js:50:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5).
power-maverick-bot[bot] commented 1 year ago

Thanks for opening your first issue here! Please make sure you have given us as much context as possible. One of the repo maintainer will respond as soon as possible.

SescoEnvDev commented 1 year ago

I just realized the log output is not the same as the error message that appears in the browser.

Error Message

Request Id: 3ef2adb3-ff57-417b-9842-607f8709d000
Correlation Id: 7d870c51-bd62-4bf3-ba79-330d0334daf6
Timestamp: 2023-08-10T16:42:02Z
Message: AADSTS70011: The provided request must include a 'scope' input parameter. The provided value for the input parameter 'scope' is not valid. The scope https://sesconv.crm.dynamics,com/user_impersonation openid profile offline_access is not valid. The scope format is invalid. Scope must be in a valid URI form <https://example/scope> or a valid Guid <guid/scope>.

image

SescoEnvDev commented 1 year ago

Therre was a typo in my URL. Will attempt with corrected URL, and post the results.

SescoEnvDev commented 1 year ago

Closed due to user error. Opened new issue with updated error.