Skip to content

Restore OWIN 5.7.1 packages from internal IDDP feed in PR pipeline#3912

Merged
iarekk merged 2 commits into
masterfrom
iarekk/pipeline-owin-internal-feed
Jul 2, 2026
Merged

Restore OWIN 5.7.1 packages from internal IDDP feed in PR pipeline#3912
iarekk merged 2 commits into
masterfrom
iarekk/pipeline-owin-internal-feed

Conversation

@iarekk

@iarekk iarekk commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Problem

After the ADO PR pipeline started building the solution on the ephemeral windows-2022 pool (#3911), restore fails with:

NU1603: Warning As Error: Microsoft.Identity.Web.OWIN depends on
Microsoft.IdentityModel.Protocols.WsFederation (>= 5.7.1) but 5.7.1 was not found.
6.5.0 was resolved instead.  (same for Microsoft.IdentityModel.Tokens.Saml)

Microsoft.Identity.Web.OWIN.csproj pins the IdentityModel v5 packages to 5.7.1 when TF_BUILD=true (i.e. on any ADO agent), otherwise 5.7.0. Version 5.7.1 is only published to the internal IDDP Azure Artifacts feed, not nuget.org — the repo NuGet.Config only lists nuget.org, so restore can't find it, and repo-wide TreatWarningsAsErrors promotes NU1603 to an error.

Fix

At PR-build time, remove the public nuget.org source and restore exclusively through the internal IDDP feed (identitydivision/_packaging/IDDP), which upstreams nuget.org for public packages and serves the internal 5.7.1 IdentityModel packages. Credentials come from the existing NuGetAuthenticate@1 task already run in template-install-dependencies.yaml. This mirrors the established pattern in build/template-restore-build-MSIdentityWeb.yaml.

  • Source changes are applied at pipeline runtime only; the committed NuGet.Config is unchanged, so GitHub Actions / public restores are unaffected.
  • The remove and add steps are idempotent.

Notes

This assumes the PR pipeline's build identity can authenticate to the IDDP feed (same identitydivision org). If it cannot, we'd fall back to overriding the OWIN package version to the public 5.7.0.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

The OWIN project pins Microsoft.IdentityModel WsFederation/Saml to 5.7.1 on
ADO agents (TF_BUILD=true). That version is only published to the internal
IDDP Azure Artifacts feed, not nuget.org, so restore failed with NU1603
(warning-as-error) on the ephemeral windows-2022 pool.

Add the IDDP feed as a package source before the build, reusing the existing
NuGetAuthenticate@1 task from template-install-dependencies.yaml for
credentials. nuget.org is retained for all other packages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@iarekk
iarekk requested a review from a team as a code owner July 2, 2026 10:35
Remove the public nuget.org source during the ADO PR build so restore routes
solely through the internal IDDP Azure Artifacts feed, which upstreams
nuget.org for public packages and serves the internal 5.7.1 IdentityModel
packages. Mirrors template-restore-build-MSIdentityWeb.yaml.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@iarekk
iarekk merged commit bf124b5 into master Jul 2, 2026
4 checks passed
@iarekk
iarekk deleted the iarekk/pipeline-owin-internal-feed branch July 2, 2026 10:52
This was referenced Jul 3, 2026
This was referenced Jul 13, 2026
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.

2 participants