microsoft-identity-web icon indicating copy to clipboard operation
microsoft-identity-web copied to clipboard

Installed dotnet 8 SDK and IDE 17.10.0 but cannot install msidentity-app-sync

Open bkwdesign opened this issue 2 months ago • 0 comments

Microsoft.Identity.Web Library

Microsoft.Identity.Web

Microsoft.Identity.Web version

1.25.0

Web app

Sign-in users

Web API

Not Applicable

Token cache serialization

Not Applicable

Description

I'm using VS 2022 (VS 17.10.0)

My previously deployed NET6 web app has expired secrets and I'm wanting to use the msidentity tooling to update everything.

IDE does not show my web project having the MS Identity resource as being configured.

image

If I hit the green-plus-icon in the UI above and attempt in install the missing tooling, it fails.

If I try to run this CLI command, dotnet tool install -g msidentity-app-sync it fails

I cannot seem to install this resource - regardless of method (using the IDE UI, using CLI, and even grabbing source from git and calling dotnet pack also fails as described here)

dotnet --list-sdks 3.1.426 5.0.404 7.0.410 8.0.204 8.0.300

dotnet pack
  Determining projects to restore...
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-lib\app-provisioning-lib.csproj : warning NU1603: app-provisioning-lib depends on Microsof
t.Extensions.Configuration.Binder (>= 7.0.4) but Microsoft.Extensions.Configuration.Binder 7.0.4 was not found. An approximate best match of Microsoft.Extensions.Configuration.Binder 8.0.0 was resol
ved. [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-lib\app-provisioning-lib.csproj : warning NU1603: app-provisioning-lib depends on System.T
ext.Json (>= 7.0.3) but System.Text.Json 7.0.3 was not found. An approximate best match of System.Text.Json 8.0.0 was resolved. [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\
app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-tool\msidentity-app-sync.csproj : warning NU1603: app-provisioning-lib depends on Microsof
t.Extensions.Configuration.Binder (>= 7.0.4) but Microsoft.Extensions.Configuration.Binder 7.0.4 was not found. An approximate best match of Microsoft.Extensions.Configuration.Binder 8.0.0 was resol
ved. [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-tool\msidentity-app-sync.csproj : warning NU1603: app-provisioning-lib depends on System.T
ext.Json (>= 7.0.3) but System.Text.Json 7.0.3 was not found. An approximate best match of System.Text.Json 8.0.0 was resolved. [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\
app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-lib\app-provisioning-lib.csproj : error NU1100: Unable to resolve 'Azure.Identity (>= 1.11
.4)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\repos\msidentity\microsoft-iden
tity-web\tools\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-lib\app-provisioning-lib.csproj : error NU1100: Unable to resolve 'Microsoft.Graph.Beta (>
= 5.42.0-preview)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\repos\msidentity\
microsoft-identity-web\tools\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-lib\app-provisioning-lib.csproj : error NU1100: Unable to resolve 'Microsoft.Identity.Clie
nt.Extensions.Msal (>= 4.61.3)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\repo
s\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-tool\msidentity-app-sync.csproj : error NU1100: Unable to resolve 'System.CommandLine.Drag
onFruit (>= 0.4.0-alpha.22272.1)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\re
pos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-tool\msidentity-app-sync.csproj : error NU1100: Unable to resolve 'Azure.Identity (>= 1.11
.4)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\repos\msidentity\microsoft-iden
tity-web\tools\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-tool\msidentity-app-sync.csproj : error NU1100: Unable to resolve 'Microsoft.Graph.Beta (>
= 5.42.0-preview)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\repos\msidentity\
microsoft-identity-web\tools\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-tool\msidentity-app-sync.csproj : error NU1100: Unable to resolve 'Microsoft.Identity.Clie
nt.Extensions.Msal (>= 4.61.3)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\repo
s\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\tests\Tests.csproj : warning NU1603: Tests depends on Microsoft.NET.Test.Sdk (>= 16.6.1) but Microsoft.NET.
Test.Sdk 16.6.1 was not found. An approximate best match of Microsoft.NET.Test.Sdk 16.7.1 was resolved. [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\ap
p-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\tests\Tests.csproj : warning NU1603: Tests depends on xunit.runner.visualstudio (>= 2.4.2) but xunit.runner
.visualstudio 2.4.2 was not found. An approximate best match of xunit.runner.visualstudio 2.4.3 was resolved. [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-t
ool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\tests\Tests.csproj : error NU1100: Unable to resolve 'Microsoft.NETCore.App.Ref (= 7.0.19)' for 'net7.0'. P
ackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-p
rovisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\tests\Tests.csproj : error NU1100: Unable to resolve 'Microsoft.WindowsDesktop.App.Ref (= 7.0.19)' for 'net
7.0'. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tool
s\app-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\tests\Tests.csproj : error NU1100: Unable to resolve 'Microsoft.AspNetCore.App.Ref (= 7.0.19)' for 'net7.0'
. PackageSourceMapping is enabled, the following source(s) were not considered: C:\Program Files\dotnet\library-packs, NuGet. [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\ap
p-provisioning-tool\app-provisioning.sln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\tests\Tests.csproj : error NU1201: Project app-provisioning-lib is not compatible with net7.0 (.NETCoreApp,
Version=v7.0). Project app-provisioning-lib supports: net8.0 (.NETCoreApp,Version=v8.0) [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning.s
ln]
C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\tests\Tests.csproj : error NU1201: Project msidentity-app-sync is not compatible with net7.0 (.NETCoreApp,V
ersion=v7.0). Project msidentity-app-sync supports: net8.0 (.NETCoreApp,Version=v8.0) [C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning.sln
]
  Failed to restore C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-tool\msidentity-app-sync.csproj (in 352 ms).
  Failed to restore C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-lib\app-provisioning-lib.csproj (in 352 ms).
  Failed to restore C:\Users\bwatts\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\tests\Tests.csproj (in 394 ms).

Reproduction steps

Stack trace (as shown in prior section) will occur when I try to compile app-provisioning-tool tool directly

Failure happens on dotnet pack

git clone https://github.com/AzureAD/microsoft-identity-web
cd tools\app-provisioning-tool
dotnet pack
dotnet tool install --global --add-source app-provisioning-tool\nupkg msidentity-app-sync

Above 4 lines were taken from app-provisioning-tool README

Error message

Failed to restore C:\XXXXX\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-tool\msidentity-app-sync.csproj (in 352 ms). Failed to restore C:\XXXXXX\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\app-provisioning-lib\app-provisioning-lib.csproj (in 352 ms). Failed to restore C:\XXXXXXX\source\repos\msidentity\microsoft-identity-web\tools\app-provisioning-tool\tests\Tests.csproj (in 394 ms).

Id Web logs

My app when run in Visual Studio will produce this error, and I can see in the Azure portal my client secrets have expired.

"error_description":"AADSTS7000222: The provided client secret keys for app '12345099-0000-aaaa-bbbb-aaabbcccdddd' are expired.
~``

### Relevant code snippets

```csharp
git clone https://github.com/AzureAD/microsoft-identity-web
cd tools\app-provisioning-tool
dotnet pack
dotnet tool install --global --add-source app-provisioning-tool\nupkg msidentity-app-sync

Above 4 lines were taken from app-provisioning-tool README



### Regression

_No response_

### Expected behavior

Expected tool to install successfully in my VS 2022 (17.10.0) and not get a nuget error

bkwdesign avatar Jun 19 '24 21:06 bkwdesign