Metered APIs and services in Microsoft Graph FAQ
This article provides answers to frequently asked questions about metered APIs and services in Microsoft Graph.
Billing setup FAQs
What permissions are required to set up billing?
Setting up billing requires permissions both for the application registration and the Azure subscription you wish to use. Required permissions for the application registration are Application Owner or Application Administrator. Required permissions for the Azure subscription are Subscription Contributor, Owner / Resource Group Contributor, or Owner.
Can I use a service principal to set up billing on my app registration?
Yes, it requires an application administrator or similar role for the app registration assigned to the service principal. The role can be scoped to only the target application set up for billing to prevent overly broad permissions from being granted.
Can I use a managed identity to set up billing on my app registration?
Yes, you can create a managed identity for Azure resources. Assign role-based access control to your subscription or resource group, and add the Microsoft Entra application administrator role to the service principal associated with the managed identity. For more information, see Tutorial: Use a Windows VM/VMSS to access Azure resources for an example.
How can I verify that my application is properly set up for billing?
For information about how to verify billing setup, see Enable metered APIs and services.
Microsoft Teams export API billing FAQs
Are there more requirements beyond setting up billing to call Microsoft Teams export APIs?
Yes, Microsoft Teams export APIs require a model
parameter to be passed as part of the API call. Depending on the value of the model
parameter, a user license may also be required for certain data. For more information, see Teams API payment models and licensing requirements.
How do I know which model parameter is being used in API calls?
The best way to determine which model
parameter is in use is to inspect the code of the calling application.
How is seeded capacity calculated?
Seeded capacity for Teams export APIs being called with the model=a
parameter is calculated based on the number of eligible users in the target tenant. Seeded capacity is then applied to each application running against that tenant.
How is seeded capacity applied?
Seeded capacity is evaluated at the beginning of the month, and any eligible license counts to the tenant-level calculation of seeded capacity. Each application then consumes the seeded capacity allocated to it until it is depleted. Further consumption by the application is then metered and appears on the monthly bill.
What happens when an app that is registered but not set up for billing initiates a metered Teams export API call?
The API call fails with a 402 payment required error. This occurs even when targeting a user with a valid user license and passing the model=a
parameter.
What happens when the model parameter is excluded from a call to a Microsoft Teams export API that requires it?
When calling an API without a required model
parameter, the API defaults to evaluation-mode behavior. The evaluation mode provides a limited number of API calls per month before returning the 402 payment required error. The evaluation mode is provided for evaluation and development only and isn't intended for production use.
Application consumer FAQ
Why is my application provider asking me to set up billing?
The owner of the application registration handles billing for metered APIs and services in Microsoft Graph. If you acquired an application that requires you to be the owner of the application registration, you are responsible for any metered APIs and services used by the application.
Do I need licenses for every user in my tenant?
A license is required for each user subject to security and compliance policies. Other scenarios may not require a license. For more information, see Teams API payment models and licensing requirements.
Cost management and billing FAQ
Where can I get the billing information for metered APIs and services?
Billing data is submitted to the Azure subscription used to create the Microsoft Graph billing resource under the service name Microsoft Graph services, and it is typically available 24 hours after the transactions occur.
For more information, see Azure cost management and billing overview.
The following table lists the most frequently used tools to review and monitor billing charges.
Type | Description |
---|---|
Cost analysis | Interactive chart that displays consumption. Hint: Use accumulated costs and filter by service name Microsoft Graph services. |
Exports | Creates detailed reports with desired frequency (for example, daily or monthly). |
Alerts | Configures alerts by combining filters. |
Is the bill broken down for each API?
The following table shows how the billing details can be aggregated or broken.
Type | Exports property | Cost analysis, budgets, and alerts filter |
---|---|---|
Meter information | MeterName, MeterId, MeterCategory, MeterSubcategory, ProductName, ConsumedService | Meter, Meter category, Meter subcategory, Service name |
Resource information | InstanceId, ResourceType, ResourceGroup, SubscriptionGuid | Resource, Resource guid, Resource type, Resource group, Service name |
Tags | TenantId | TenantId |
AdditionalInfo | AppId, TenantId |
Some endpoints might share a meter, and billing data can't be broken down by endpoint. Alternatively, a client app can set up client-side API logging or use Microsoft Graph activity logs.
Known limitations
The following limitations apply to metered APIs:
- Metered APIs and services in Microsoft Graph are currently available only in the Microsoft global environment and not in national cloud deployments, including Microsoft 365 GCC deployments accessed through the worldwide Microsoft Graph endpoint. For details about national clouds, see National cloud deployments.
- The target application must be a confidential client application (for example, web application, web API, or daemon/service). Public client applications (desktop and mobile applications) aren't supported.
- Azure managed identities aren't supported to call metered APIs. For more information, see Azure services that support managed identities.