Windows 11 PSEC API returns 0x80070002 under session-0 batch logon — request for Windows engineering guidance.
Hello,
I'm requesting technical guidance regarding the native Windows CreateProcessSecurityEnvironment API, exported by processmodel.dll.
We previously submitted a detailed investigation to the Microsoft MXC repository:
https://github.com/microsoft/mxc/issues/1631
The issue has been triaged and categorized but remains unresolved. Because the PSEC implementation resides within Windows itself, we're hoping someone familiar with the Windows API or ProcessContainer implementation can help identify the appropriate supported diagnostic procedure.
Verified failure
Environment: Windows 11 Home 25H2, build 26200.9711, x64.
Native operation: CreateProcessSecurityEnvironment
Observed result: HRESULT 0x80070002 (ERROR_FILE_NOT_FOUND), null PSEC handle.
The diagnostic successfully resolves the Windows API-set, loads the required System32 DLLs and resolves the native exports. The failure occurs during environment creation, before startup attributes are initialized or a child process is started.
The input is a verified, 88-byte PSEC 1.0 FlatBuffer specification, with creation flags zero and no explicit filesystem paths or grants.
The failing caller uses:
Medium integrity, non-elevated token
Restricted-token indicator enabled
Non-AppContainer context
Session 0
Batch logon type 4
No loaded user-profile hive
A previous interactive-account diagnostic accepted the same serialized specification hash on the same reported Windows build. However, several environmental differences remain, so the cause has not been isolated.
Questions for Windows engineering
Is native PSEC creation supported under this exact batch-logon/session-0 context? Does the API require a loaded profile hive or other caller-specific prerequisites?
What documented Windows operation or prerequisite can produce 0x80070002 during PSEC environment creation when no filesystem grants are specified?
Is there a supported, narrowly scoped diagnostic interface for identifying the failing internal operation without changing the caller's token, modifying the security policy or enabling permissive learning mode?
If this behavior falls outside the public Windows SDK documentation, which Windows engineering team or technical-support channel owns the implementation?
We have already performed extensive offline verification and non-invasive system inspection. We deliberately have not weakened the sandbox, modified Windows services or drivers, or changed the original security context.
We are looking for an authoritative prerequisite contract or safe diagnostic method, rather than speculative workarounds.
Thank you for any guidance or referral to the appropriate Windows engineering team.
Windows 11 PSEC API returns 0x80070002 under session-0 batch logon — request for Windows engineering guidance
Hello,
I'm requesting technical guidance regarding the native Windows CreateProcessSecurityEnvironment API, exported by processmodel.dll.
We previously submitted a detailed investigation to the Microsoft MXC repository:
https://github.com/microsoft/mxc/issues/1631
The issue has been triaged and categorized but remains unresolved. Because the PSEC implementation resides within Windows itself, we're hoping someone familiar with the Windows API or ProcessContainer implementation can help identify the appropriate supported diagnostic procedure.
Verified failure
Environment: Windows 11 Home 25H2, build 26200.9711, x64.
Native operation: CreateProcessSecurityEnvironment
Observed result: HRESULT 0x80070002 (ERROR_FILE_NOT_FOUND), null PSEC handle.
The diagnostic successfully resolves the Windows API-set, loads the required System32 DLLs and resolves the native exports. The failure occurs during environment creation, before startup attributes are initialized or a child process is started.
The input is a verified, 88-byte PSEC 1.0 FlatBuffer specification, with creation flags zero and no explicit filesystem paths or grants.
The failing caller uses:
Medium integrity, non-elevated token
Restricted-token indicator enabled
Non-AppContainer context
Session 0
Batch logon type 4
No loaded user-profile hive
A previous interactive-account diagnostic accepted the same serialized specification hash on the same reported Windows build. However, several environmental differences remain, so the cause has not been isolated.
Questions for Windows engineering
Is native PSEC creation supported under this exact batch-logon/session-0 context? Does the API require a loaded profile hive or other caller-specific prerequisites?
What documented Windows operation or prerequisite can produce 0x80070002 during PSEC environment creation when no filesystem grants are specified?
Is there a supported, narrowly scoped diagnostic interface for identifying the failing internal operation without changing the caller's token, modifying the security policy or enabling permissive learning mode?
If this behavior falls outside the public Windows SDK documentation, which Windows engineering team or technical-support channel owns the implementation?
We have already performed extensive offline verification and non-invasive system inspection. We deliberately have not weakened the sandbox, modified Windows services or drivers, or changed the original security context.
We are looking for an authoritative prerequisite contract or safe diagnostic method, rather than speculative workarounds.
Thank you for any guidance or referral to the appropriate Windows engineering team.