NetworkIsolationGetEnterpriseIdAsync function (netfw.h)
Gets the Enterprise ID based on Network Isolation endpoints in the context of the Windows Information Protection (WIP) or the Microsoft Defender Application Guard (MDAG) scenarios. If neither WIP nor MDAG are on, the API returns NULL, unless the flag NETISO_GEID_FORCE_TO_CHECK is passed. The Enterprise ID can be any string different from NULL or “*”.
Example of NetworkIsolationGetEnterpriseIdAsync usage: https://github.com/microsoft/EnterpriseStateClassify
Syntax
DWORD NetworkIsolationGetEnterpriseIdAsync(
[in] LPCWSTR wszServerName,
[in] DWORD dwFlags,
[in, optional] void *context,
[in] PNETISO_EDP_ID_CALLBACK_FN callback,
[out] HANDLE *hOperation
);
Parameters
[in] wszServerName
The name of the Enterprise Data Protection Server.
[in] dwFlags
A bitmask value of control flags which specify the context of the API call. May contain one or more of the following flags.
Value | Meaning |
---|---|
NETISO_GEID_DEFAULT 0x00 |
Default API behavior. Returns the Enterprise ID for Enterprise resources. Returns NULL for Personal resources. For Neutral resources, returns Enterprise ID if it is called from an Enterprise context, or returns NULL if it is called from a Personal context. |
NETISO_GEID_FOR_WDAG 0x01 |
Used in the context of the Microsoft Defender Application Guard (MDAG) scenario. |
NETISO_GEID_FOR_NEUTRAL_AWARE 0x02 |
Used by applications that are aware of neutral resources. For Neutral resources the API will return L”*”. For Enterprise resources the API will return the Enterprise ID. For Personal resources the API will return NULL. |
NETISO_GEID_FORCE_TO_CHECK 0x04 |
Forces API to check the resource even in cases when neither Windows Information Protection nor MDAG are enabled. |
[in, optional] context
Optional context pointer.
[in] callback
Function pointer that will be invoked when a notification is ready for delivery.
[out] hOperation
The handle for the Enterprise Data Protection Server endpoints.
Return value
Returns ERROR_SUCCESS if successful, or an error value otherwise.
Remarks
Note
Windows Defender Application Guard (WDAG) is now Microsoft Defender Application Guard (MDAG). The WDAG name is deprecated, but it is still used in some APIs.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 [desktop apps only] |
Minimum supported server | Windows Server 2016 [desktop apps only] |
Target Platform | Windows |
Header | netfw.h |
DLL | Firewallapi.dll |