Hi Kumar, Chandan,
Thank you for posting in the Q&A Forums.
Windows 11 may introduce new security policies or default permission settings that may prevent your application from accessing tokens in the same way. Ensure that your application has sufficient permissions to perform the required actions. Windows 11 may have stricter UAC settings. Ensure that your application correctly handles UAC prompts when requesting elevated privileges. Check the Group Policy and security settings for Windows 11 for any changes related to authentication or token access. Enable detailed logging on Windows 11 and carefully analyze error messages and log entries to get more information about the cause of the failure. Use debugging tools such as WinDbg to trace and debug your application, and see how it behaves when calling Win32 functions. Make sure your app and all dependencies are updated to versions compatible with Windows 11. Check for any known compatibility issues or fixes that may affect the behavior of your application on Windows 11
Best regards
NeuviJ
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.