402 : Payment Required with Developer E5 Sandbox

Mike Cantrell 0 Reputation points
2023-09-13T12:26:38.8766667+00:00

I've stood up a developer E5 sandbox to test the Graph Teams export API. I know that these APIs require a payment model but I didn't expect the sandbox to enforce it:

https://learn.microsoft.com/en-us/graph/teams-licenses

I'm not sure what to do here. It doesn't appear that you can enter payment information for the API with a sandbox subscription. I can't re-provision the sandbox without deleting my profile and waiting up to 60 days.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,521 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Antonio 250 Reputation points Microsoft Vendor
    2023-09-13T13:34:25.4133333+00:00

    Hi Mike Cantrell

    As mentioned in the docs (See below) metered APIs and services in Microsoft Graph that consumes the APIs must be associated with an Azure subscription. This subscription will be billed for any metered charges.
    https://learn.microsoft.com/en-us/microsoft-365/enterprise/subscriptions-licenses-accounts-and-tenants-for-microsoft-cloud-offerings?view=o365-worldwide#subscriptions

    See the article for Creating/Adding Enterprise and Organization Azure Dev/Test Subscriptions
    https://learn.microsoft.com/en-us/azure/devtest/offer/quickstart-create-enterprise-devtest-subscriptions

    https://learn.microsoft.com/en-us/azure/devtest/offer/quickstart-create-enterprise-devtest-subscriptions#add-your-azure-enterprise-devtest-subscription

    Further note billing model available:
    https://learn.microsoft.com/en-us/graph/teams-licenses#payment-models
    User's image

    For additional aid in Azure billing setup please open a case with Azure support:
    https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

    For requesting to update doc pages please refer to bottom of page in doc and in the "Submit and view feedback for" section click "This page" for GitHub review request.

    --please don't forget to upvote and Accept as answer if the reply is helpful--


  2. Mike Cantrell 0 Reputation points
    2023-09-14T14:00:50.4133333+00:00

    Counter to what the Team API licensing documentation states, it is not possible to use a real payment model with the developer sandbox subscription:

    https://learn.microsoft.com/en-us/graph/teams-licenses#payment-models You can get a free Microsoft 365 E5 developer sandbox subscription with 25 user licenses through the Microsoft 365 Developer Program.

    The Team API licensing documentation should be updated to reflect this limitation instead of encouraging users to take that route. That's the entire reason we signed up for a sandbox subscription. We've lost a few days due to this and it's an expensive mistake.


  3. Mike Cantrell 0 Reputation points
    2023-09-14T18:10:35.7966667+00:00

    OK, we received the same error from our non-sandbox Azure subscription. The solution is to create resource groups and register your application to use the metered Graph API:

    New-AzResourceGroup -Name "MyApp" -Location "East US"
    Register-AzResourceProvider -ProviderNamespace Microsoft.GraphServices
    New-AzResource -ResourceName MyAppBilling -ResourceGroupName MyApp -ResourceType Microsoft.GraphServices/accounts -Properties @{"appId"="xxxx-xxxx-xxxx-xxxx-xxxxxx"} -Location Global -Force
    

    I haven't tried this with the sandbox subscription (we've moved on) but I'm assuming this would have fixed it as well.