0

So I was upgrading my UWP solution to WindowsAppSDK and Winui3 when I noticed this error that Microsoft.Identity.Client doesnt seem to have WithUseCorporateNetwork method anymore in the build pipeline of PublicClientApplicationBuilder which produces the following error :

PublicClientApplicationBuilder does not contain a definition for WithUseCorporateNetwork

enter image description here

I have tried multiple versions like 4.42.0 and 4.46.0 but they dont work.

The project containing this code is a WINUI3/WindowsAppSDK class library, based on Dotnet 6

Muhammad Touseef
  • 4,357
  • 4
  • 31
  • 75
  • It's not strictly related to WinUI3, this option is only available with UWP builds (see the WINDOWS_APP define condition here https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/main/src/client/Microsoft.Identity.Client/AppConfig/PublicClientApplicationBuilder.cs#L205). It was related to this: https://learn.microsoft.com/en-us/uwp/api/windows.security.authentication.web.webauthenticationoptions?view=winrt-22621#fields (UseCorporateNetwork) which is not available for regular desktop applications. – Simon Mourier Sep 13 '22 at 17:11
  • @SimonMourier so you mean this feature is only available in uwp and not in windowsAppSDK and winui3 windows desktop projects? – Muhammad Touseef Sep 13 '22 at 17:12
  • "This option is only available with UWP builds". – Simon Mourier Sep 13 '22 at 17:13

0 Answers0