DiscoverManagementService function (mdmregistration.h)

Discovers the MDM service. The discovery process uses the [MS-MDE]: Mobile Device Enrollment Protocol protocol.

Syntax

HRESULT DiscoverManagementService(
  [in]  LPCWSTR                  pszUPN,
  [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.

[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.

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

See also

MANAGEMENT_SERVICE_INFO

MDM Registration Error Values

MDM Registration Functions