Skip to content

Azvise

Notes on Microsoft stuff ☁️

  • Home
  • Articles
  • Security
  • Passwordless
  • About
  • Speaking

CleanupInvalidSessions

January 21, 2021July 12, 2023 Azvise

The Group Policy Client service failed the sign-in. Access is denied – AVD/WVD

If you get this error there is probably something wrong with the user profile. It’s usually either that the VHD / VHDx is locked, or the cached profile is broken.

In the first case sometimes the Windows Session closes down and doesn’t alert FSLogix to unlock the disk. Before you reboot the VM, consider adding the following registry entry:

CleanupInvalidSessions

Path: HKEY_LOCAL_MACHINE\Software\fslogix\apps\CleanupInvalidSessions

Type: DWORD

Value to set: 1

At times a Windows Session may suffer an inelegant termination, in these cases FSLogix is not provided an appropriate event to trigger the dismount of the VHD(x) file for Profile Container and Office Container. By setting CleanupInvalidSessions to 1, additional FSLogix logic is triggered to make this scenario less likely. Setting CleanupInvalidSessions will cause the functionality to be utilized for both Profile Container and Office Container. KNOWN ISSUE: at this time CleanupInvalidSessions should not be used in conjunction with Cloud Cache when concurrent sessions (e.g utilizing ProfileType/VHDAccessMode) are in use.

https://docs.microsoft.com/en-us/fslogix/profile-container-configuration-reference

In the second case head into C:\Users\ and backup the profile related to the blocked user, then rename it to profilename_local.

 




Whoami
Welcome to my blog. I'm Pietro, and I work as a Security Architect on Microsoft technologies. I'm passionate about Security, Identity, Azure, and Formula 1. I'm sometimes playing around with Intune stuff.
I hope you'll save a bit of time and learn something new from my articles. Enjoy!

  • Azure (27)
  • Entra ID (Azure AD) (22)
  • Exchange Online (7)
  • General (3)
  • Intune (3)
  • Microsoft 365 (4)
  • Passwordless (2)
  • Powershell (6)
  • Security (46)
https://sessionize.com/pietro-visentin
Tweets by azvise
  • Twitter
  • LinkedIn
Do you speak Italian and want to discuss security topics? Join the Microsoft Security Italian User Group!
Create a website or blog at WordPress.com
  • Subscribe Subscribed
    • Azvise
    • Already have a WordPress.com account? Log in now.
    • Azvise
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...