RegisterDeviceWithManagement function (mdmregistration.h)
Registers a device with a MDM service, using the [MS-MDE]: Mobile Device Enrollment Protocol.
Syntax
HRESULT RegisterDeviceWithManagement(
[in] LPCWSTR pszUPN,
[in] LPCWSTR ppszMDMServiceUri,
[in] LPCWSTR ppzsAccessToken
);
Parameters
[in] pszUPN
Address of a NULL-terminated Unicode string containing the user principal name (UPN) of the user requesting the registration.
Windows 8.1: This parameter was located after the ppszMDMServiceUri parameter in Windows 8.1.
[in] ppszMDMServiceUri
Address of a NULL-terminated Unicode string containing the URI of the MDM service.
[in] ppzsAccessToken
Address of a NULL-terminated Unicode string containing a token acquired from a Secure Token Service which the management service will use to validate the user.
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 |