ProvisioningAgent ProvisioningAgent ProvisioningAgent ProvisioningAgent Class

Definition

Represents an agent that provisions connectivity and subscription information with a network provider.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : sealed class ProvisioningAgent : IProvisioningAgent
public sealed class ProvisioningAgent : IProvisioningAgent
Public NotInheritable Class ProvisioningAgent Implements IProvisioningAgent
var provisioningAgent = new provisioningAgent();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
cellularDeviceControl networkConnectionManagerProvisioning networkDataPlanProvisioning cellularDeviceIdentity

Constructors

ProvisioningAgent() ProvisioningAgent() ProvisioningAgent() ProvisioningAgent()

Creates a new instance of a ProvisioningAgent.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : ProvisioningAgent()
public ProvisioningAgent()
Public Sub New()
var provisioningAgent = new provisioningAgent();
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
cellularDeviceControl networkConnectionManagerProvisioning networkDataPlanProvisioning networkDataPlanProvisioning cellularDeviceIdentity

Methods

CreateFromNetworkAccountId(String) CreateFromNetworkAccountId(String) CreateFromNetworkAccountId(String) CreateFromNetworkAccountId(String)

Creates a provisioning agent for the mobile device associated with the supplied network account ID.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : static ProvisioningAgent CreateFromNetworkAccountId(Platform::String networkAccountId)
public static ProvisioningAgent CreateFromNetworkAccountId(String networkAccountId)
Public Static Function CreateFromNetworkAccountId(networkAccountId As String) As ProvisioningAgent
var provisioningAgent = Windows.Networking.NetworkOperators.ProvisioningAgent.createFromNetworkAccountId(networkAccountId);
Parameters
networkAccountId
Platform::String String String String

The network account ID to use to select the corresponding mobile broadband device to use for the provisioning agent.

Returns

The provisioning agent for the mobile device associated with the supplied network account ID.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
cellularDeviceControl networkConnectionManagerProvisioning networkDataPlanProvisioning cellularDeviceIdentity

GetProvisionedProfile(ProfileMediaType, String) GetProvisionedProfile(ProfileMediaType, String) GetProvisionedProfile(ProfileMediaType, String) GetProvisionedProfile(ProfileMediaType, String)

Retrieves cost and plan information associated with the mobile broadband profile.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : ProvisionedProfile GetProvisionedProfile(ProfileMediaType mediaType, Platform::String profileName)
public ProvisionedProfile GetProvisionedProfile(ProfileMediaType mediaType, String profileName)
Public Function GetProvisionedProfile(mediaType As ProfileMediaType, profileName As String) As ProvisionedProfile
var provisionedProfile = provisioningAgent.getProvisionedProfile(mediaType, profileName);
Parameters
mediaType
ProfileMediaType ProfileMediaType ProfileMediaType ProfileMediaType

The media type that the profile belongs to.

profileName
Platform::String String String String

The name of the profile that the cost will be applied to.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
cellularDeviceControl networkConnectionManagerProvisioning networkDataPlanProvisioning cellularDeviceIdentity

ProvisionFromXmlDocumentAsync(String) ProvisionFromXmlDocumentAsync(String) ProvisionFromXmlDocumentAsync(String) ProvisionFromXmlDocumentAsync(String)

Provisions a device for network connectivity asynchronously, based on the supplied XML document.

Note

This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : IAsyncOperation<ProvisionFromXmlDocumentResults> ProvisionFromXmlDocumentAsync(Platform::String provisioningXmlDocument)
public IAsyncOperation<ProvisionFromXmlDocumentResults> ProvisionFromXmlDocumentAsync(String provisioningXmlDocument)
Public Function ProvisionFromXmlDocumentAsync(provisioningXmlDocument As String) As IAsyncOperation( Of ProvisionFromXmlDocumentResults )
var iAsyncOperation = provisioningAgent.provisionFromXmlDocumentAsync(provisioningXmlDocument);
Parameters
provisioningXmlDocument
Platform::String String String String

An instance of CarrierControlSchema that contains the network connectivity provisioning information.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
cellularDeviceControl networkConnectionManagerProvisioning networkDataPlanProvisioning cellularDeviceIdentity

Remarks

You can retrieve the results of the provisioning attempt using the ProvisionResultsXml method when the provisioning attempt has completed.

ProvisionFromXmlDocumentAsync returns critical errors as HRESULTs that are then translated into exceptions. The most common HRESULTs returned are listed below:

NameHRESULTDescription
E_ACCESSDENIED0x80070005LCaller is an operator app, but attempted to provision a different operator’s profiles
PROVCORE_E_XML_MALFORMED0x82170001Provisioning file is not well-formed XML
PROVCORE_E_XML_INVALID0x82170002Provisioning file does not conform to schema
PROVCORE_E_XML_SIGNATURE_INVALID0x82170003Provisioning file signature is invalid
PROVCORE_E_XML_SIGNATURE_UNTRUSTED0x82170004Signing certificate is not chained to a trusted root CA
PROVCORE_E_XML_DIGEST_INVALID0x82170005Provisioning file was modified after being signed
PROVCORE_E_XML_SIGNER_UNTRUSTED0x82170006User did not approve provisioning from this certificate.
PROVCORE_E_NO_LEAF_CERT0x82170007No leaf certificate was included in XML signature
PROVCORE_E_SIGNING_CERTIFICATE_INVALID_FOR_SIGNING0x8217000DSigning certificate does not meet requirements (Extended Validation, digital signature usage)
PROVCORE_E_XML_MISSING_SIGNATURE0x8217000EXML was not signed (and caller was not a mobile broadband operator app)