Skip to content

Expose credential CLI options and align docs with DataverseConnection - #354

Merged
mkholt merged 1 commit into
masterfrom
dataverse-connection-settings-fe6
Sep 11, 2026
Merged

mkholt merged 1 commit into
masterfrom
dataverse-connection-settings-fe6

Conversation

@mkholt

@mkholt mkholt commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

DataverseConnection now defaults to browser auth and reads the flat DataverseUrl / DataverseCredentialType keys (legacy uppercase forms still honoured). Expose both as CLI overrides and bring the docs in line.

xrmmockup-metadata gains:
-t, --credential-type <browser|devicecode|azcli>
-u, --dataverse-url

Rather than translating these into AddDataverse(configureOptions), they are injected as a last-wins in-memory configuration source, so DataverseConnection keeps ownership of key names, defaults and precedence. Values are still validated at parse time so a typo fails immediately instead of surfacing later as a connection error.

TestEnvProvisioner gets the same two flags, and no longer rejects a config that uses the new DataverseUrl key with "DATAVERSE_URL is not set".

Docs now use the current key names, document the three credential types, and point at context-and-oss/DataverseConnection. The CI/CD examples previously set only DATAVERSE_URL and relied on Azure Default Credentials, which under the new default silently becomes an interactive browser sign-in; they now select azcli.

Also bump xrmcontext to 4.0.0-beta.26, which bundles the current DataverseConnection (4.0.0 stable is unlisted and bundles the older net8.0 build). That lets the repo's own appsettings.json files move to DataverseUrl. The bump would not have taken effect on its own: dotnet new tool-manifest now writes dotnet-tools.json in the folder root instead of .config/, so the regeneration script's manifest check never matched, and the path that did match ran dotnet tool restore, pinning whatever version was already installed. It now finds the manifest in either location and always installs the pinned version.

DataverseConnection now defaults to browser auth and reads the flat
DataverseUrl / DataverseCredentialType keys (legacy uppercase forms still
honoured). Expose both as CLI overrides and bring the docs in line.

xrmmockup-metadata gains:
  -t, --credential-type <browser|devicecode|azcli>
  -u, --dataverse-url <url>

Rather than translating these into AddDataverse(configureOptions), they are
injected as a last-wins in-memory configuration source, so DataverseConnection
keeps ownership of key names, defaults and precedence. Values are still
validated at parse time so a typo fails immediately instead of surfacing later
as a connection error.

TestEnvProvisioner gets the same two flags, and no longer rejects a config that
uses the new DataverseUrl key with "DATAVERSE_URL is not set".

Docs now use the current key names, document the three credential types, and
point at context-and-oss/DataverseConnection. The CI/CD examples previously set
only DATAVERSE_URL and relied on Azure Default Credentials, which under the new
default silently becomes an interactive browser sign-in; they now select azcli.

Also bump xrmcontext to 4.0.0-beta.26, which bundles the current
DataverseConnection (4.0.0 stable is unlisted and bundles the older net8.0
build). That lets the repo's own appsettings.json files move to DataverseUrl.
The bump would not have taken effect on its own: `dotnet new tool-manifest` now
writes dotnet-tools.json in the folder root instead of .config/, so the
regeneration script's manifest check never matched, and the path that did match
ran `dotnet tool restore`, pinning whatever version was already installed. It
now finds the manifest in either location and always installs the pinned
version.

Co-Authored-By: Claude <noreply@anthropic.com> via Conducktor <conducktor@contextand.com>
@mkholt
mkholt merged commit d276587 into master Sep 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant