DiscoverManagementServiceEx function (mdmregistration.h)
Discovers the MDM service using a candidate server. The discovery process uses the [MS-MDE]: Mobile Device Enrollment Protocol protocol.
Syntax
HRESULT DiscoverManagementServiceEx(
[in] LPCWSTR pszUPN,
[in] LPCWSTR pszDiscoveryServiceCandidate,
[out] PMANAGEMENT_SERVICE_INFO *ppMgmtInfo
);
Parameters
[in] pszUPN
Address of a NULL-terminated Unicode string containing the user principal name (UPN) of the user requesting registration.
[in] pszDiscoveryServiceCandidate
Address of a NULL-terminated Unicode string containing the discovery service candidate to use in lieu of automatic discovery.
[out] ppMgmtInfo
Address of a MANAGEMENT_SERVICE_INFO structure that contains pointers to the URIs of the management and authentication services.
Return value
If the function succeeds, the return value is ERROR_SUCCESS. If the function fails, the returned value describes the error. Possible values include those listed at MDM Registration Error Values.
Remarks
The caller of this function must be running as an elevated process.
This function is not available before Windows Server 2012 R2 Update and Windows 8.1 Update.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8.1 |
Minimum supported server | None supported |
Target Platform | Windows |
Header | mdmregistration.h |
Library | MDMRegistration.lib |
DLL | MDMRegistration.dll |