locked
E_ACCESSDENIED when calling provisioningAgent.ProvisionFromXmlDocumentAsync

    Question

  • Hi,

    I am getting E_ACCESSDENIED when calling provisioningAgent.ProvisionFromXmlDocumentAsync.
    It is called in Mobile broadband companion app so signing of xml should not be needed.

    Here's the code snippet:

    var allNetworkAccountIds = Windows.Networking.NetworkOperators.MobileBroadbandAccount.AvailableNetworkAccountIds;
    var myNetworkAccountId = allNetworkAccountIds[0];//There is only one network a/c         
    var provisioningAgent = Windows.Networking.NetworkOperators.ProvisioningAgent.CreateFromNetworkAccountId(myNetworkAccountId);
    ProvisionFromXmlDocumentResults res = await provisioningAgent.ProvisionFromXmlDocumentAsync(provisioningXmlDocument);

    provisioningXmlDocument string is:
    <?xml version="1.0"?>
    <CarrierProvisioning xmlns="http://www.microsoft.com/networking/CarrierControl/v1">
        <Global>
            <CarrierId>{00000000-1111-2222-3333-444444444444}</CarrierId>
            <SubscriberId>1234567890</SubscriberId>
        </Global>
        <MBNProfiles>
          <DefaultProfile xmlns="http://www.microsoft.com/networking/CarrierControl/WWAN/v1">
              <Name>GSMA</Name>
              <Description>MyConfig</Description>
              <HomeProviderName>ABC</HomeProviderName>
              <Context>
                  <AccessString>abc.com</AccessString>
                  <UserLogonCred>
                      <UserName>username</UserName>
                      <Password>password</Password>
                  </UserLogonCred>
              </Context>
          </DefaultProfile>
        </MBNProfiles>
    </CarrierProvisioning>

    Please advice what is wrong here.

    Thanks,
    Win8 dev


    Friday, June 1, 2012 3:25 PM

Answers

  • To fix this issue:

    I had to add service number as carrier id and imsi number as subscriberid.

    Thanks,

    Win8 dev

    Friday, June 1, 2012 5:45 PM

All replies

  • Hi,

    ACCESSDENIED exception is fixed by setting CarrierId in xml as Service Number(Metadata package).

    But I am still getting error 80070490 in ProvisionResultsXml.

    Any pointers why this is happening.

    Thanks,

    Win8 dev

    Friday, June 1, 2012 5:05 PM
  • To fix this issue:

    I had to add service number as carrier id and imsi number as subscriberid.

    Thanks,

    Win8 dev

    Friday, June 1, 2012 5:45 PM