Azure-Samples/active-directory-dotnet-desktop-msgraph-v2

The login behaves differently on different systems.

andreasscheibel opened this issue · 0 comments

This example was used to test the behavior on a local machine as well as on a server that is accessed on a user-specific basis. Locally, no login window is requested and the AccessToken is determined on the TokenCacheHelper as desired. This is the perfect use case.

The problem:

  1. Once the application is tested on the server, the user is prompted to log in for each request. The ...msalcache.bin3 file was removed before transferring to the server and automatically generated after the first login.
  2. The interface was integrated into our system. The login window opens every time behind the application and the main application must be minimized to log in.

The use case we need:

  1. I would like to handle login either by Ids only (Client ID, ClientSecret ID and Tenant ID) or to handle login by TokenCache after one time login so that user is asked for credentials only once. It is important for us to get the AccessToken after authorization.
  2. The login window should not open in the background in our case. It must open in the foreground.

I have downloaded the sample solution. Migrated the .NET framework version to 4.6.2. Replaced the client and tenant ID and started the application. In the next step I transferred the files from the release folder to the server for testing.

We use the .NET framework version 4.6.2.

Server Windows specifications:
Edition Windows 11 Enterprise multi-session
Version 21H2
Installed on ‎10/‎7/‎2022
OS build 22000.978

Local Windows specifications:
Edition Windows 11 Pro
Version 21H2
Installed on ‎17.‎11.‎2021
OS build 22000.1098
Performance Windows Feature Experience Pack 1000.22000.1098.0

Does anyone have any idea what can be doing to solve this problems?