Share via

When does the tokens generated via Windows Advapi32.dll expire?

Anonymous
2023-05-31T16:19:11+00:00

To spawn multiple process in windows and have java thread same user privileges, below tokens are being generated:

  1. Advapi32.dll.LogonUser: which provides **phToken** - A pointer to a handle variable that receives a handle to a token that represents the specified user.
  2. Advapi32.dll.DuplicateToken: which provides DuplicateTokenHandle "impersonation token"
  3. Advapi32.dll.DuplicateTokenEx: which provides primary token, which can be finally used to spawn a process

In total 3 token are being generated (mentioned above). So i've below questions:

  1. when does these token gets expired?
  2. Also, we've a separate Active Directory LOGON SERVER (it could be an aws AD, or azure AD, so if the token expiry is set to 1 hour over there, will the above mentioned tokens too will expire in one hour?
  3. Is there any windows registry, which can be used to configure expiry of the tokens generated above ?
Windows for home | Windows 10 | Security and privacy

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-05-31T16:50:26+00:00

    Hello Ravisoni7,

    I am Jaspreet Singh, an independent advisor.

    Please post your query in the programming oriented forum here:

    https://docs.microsoft.com/en-us/answers/index....

    Techcommunity forums are more suitable for this kind of questions.

    Microsoft community forums are mainly for consumer products troubleshooting and help.

    Was this answer helpful?

    0 comments No comments