msProvisionNetworks method
Attempts to configure a connection profile using credentials specified in an XML document.
![]() |
Syntax
var retval = external.msProvisionNetworks(ProvisioningXML, Result);Parameters
- ProvisioningXML
-
Type: BSTR
An XML file containing the credentials to use for provisioning the network.
- Result
-
Type: UINT
A value representing the results of the provisioning request
Value Meaning - 0
Success
- 1
General Failure Error
- 2
The schema of the XML document is not valid.
- 3
The XML document is not properly signed.
- 4
The signature is not valid.
- 5
The provisioning process was canceled.
- 6
A WiFi device could not be found.
- 7
A mobile broadband device is not present.
- 8
Multiple "not present" errors were detected.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Standards information
There are no standards that apply here.
Remarks
The XML document must conform to the following schema:
<CarrierProvisioning xmlns="http://www.microsoft.com/networking/CarrierControl/v1"> <Global> <!-- Adjust the Susbscriber ID. --> <SubscriberId>1234567890</SubscriberId> <!-- Adjust the Issuer ID to fit your own ID. --> <CarrierId>{11111111-1111-1111-1111-111111111111}</CarrierId> </Global> <MBNProfiles> <DefaultProfile xmlns="http://www.microsoft.com/networking/CarrierControl/WWAN/v1"> <!-- Adjust the profile name --> <Name>Contoso</Name> <!-- Adjust the home provider name for the given SIM/Device --> <HomeProviderName>Contoso</HomeProviderName> <Context> <!-- Adjust the access string to your APN. --> <AccessString>Contoso.Contoso</AccessString> <!-- Adjust the UserLogonCred to fit your UserLogonCred. --> <UserLogonCred> <UserName>user</UserName> <Password>password</Password> </UserLogonCred> </Context> </DefaultProfile> </MBNProfiles> </CarrierProvisioning>
In addition, the XML document must be signed using XML-DSIG in conjunction with a digital signing EV certificate to be accepted as a valid provisioning document.
Examples
The following example shows one way to call the msProvisionNetworks method.
var input = document.getElementById("inputProvXml"); var result = window.external.msProvisionNetworks(input.value);
See also
