microsoft / microsoft/powerplatform-vscode

pac auth create using incorrect service root URL

Open
#864 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

pac-cli
Dominant language
TypeScript
Stars
277
Forks
60
Avg merge
1d 1h
Merged PRs (30d)
14

Description

I am trying to create a new auth to a different dynamics enivorment other than my orgs default using:

pac auth create --environment https://xxx365dev.company.org --name xxxdev --deviceCode

I get the error of Error: Can't resolve AAD/OAuth authority for https://xxx365dev.company.org/api/data/v9

The issue is that my service root url that is should be using is https://xxx365dev.company.org/api/data/v9.1/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing pac auth create --environment https://xxx365dev.company.org --name xxxdev --deviceCode and trace the authority resolution for the service root URL. Compare the failing /api/data/v9 URL with the reported /api/data/v9.1/ endpoint; done means authentication succeeds for a non-default Dynamics environment without regressing the default case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.