Pages Menu
TwitterRssFacebook

Posted by on Apr 19, 2023 in Microsoft Teams

Act now: are you ready for Microsoft Graph billing changes coming in July?

Act now: are you ready for Microsoft Graph billing changes coming in July?

We’ve known for a while (since October 2021 in fact) that Microsoft would start charging for using specific API endpoints in Microsoft Graph.

These chargable endpoints are confined to Change Notifications for Teams activity, Export APIs and message updates. The specific APIs impacted are:

Now though, thanks to a blog post on the Microsoft 365 Platform blog, we know that Microsoft are going to start implementing their planned charging for use of these endpoints.

In this post I’ve tried to give clear advice on who should act, what you need to do by when, and answer some common questions. Let me know if there are questions you think I’ve missed!

If you created your application registration after March 1st 2023…

If your application registration (not your app, just the application registration) was created after 1st March then you are already being charged for these APIs and therefore there isn’t any new action for you to take.

If this was a surprise, then either you’re using Evaluation Mode (which is fully functional but with a low rate) and your application isn’t making enough calls to cause a problem, or you’re missing data. Check for HTTP 402: Payment Required response errors.

If you created your application registration before March 1st 2023…

If you have an application registration which is older than March 1st then you have yet to be impacted by this change.

This is changing. From July 1st 2023, your application must be registered and configured correctly, otherwise it will revert to Evaluation Mode, putting you at risk of those HTTP 402: Payment Required errors.

What is Evaluation Mode?

Evaluation Mode is the default state your application is placed into if you don’t do anything. The throughput limits for Evaluation Mode are:

  • 500 chatMessage change notification messages per month, per app
  • 500 conversationMember change notification messages per month, per app
  • 500 chat change notification messages per month, per app
  • 500 export messages across all chats per month, per app
  • 500 export messages across all channels per month, per app
  • 500 policyViolation chatMessage updates, per month, per app

After this, you will receive HTTP 402: Payment Required errors and data will not be returned until the limit resets at the start of the next month.

What do I need to do to prepare for Graph billing changes?

  • You need to associate your application with an Azure subscription for billing. This is done by creating a resource of type Microsoft.GraphServices. If this is the first time you have done this you also need to register the resource provider on your subscription, which you can do in the CLI: az provider register –namespace Microsoft.GraphServices
  • To actually associate the application with the subscription, create a new instance of a Microsoft.GraphServices resource:
az resource create --resource-group RESOURCE_GROUP_NAME --name myGraphAppBilling --resource-type Microsoft.GraphServices/accounts --properties  "{`"appId`": `"myAppGUID`"}" --location Global --subscription mySubscriptionGUID

You’ll need to know your subscription ID and application ID. More information on these commands is in the Microsoft docs: Enable metered APIs and services in Microsoft Graph – Microsoft Graph | Microsoft Learn.

Tip: I recommend creating a new resource group, either for all of these GraphService resources you create (one per application), or a separate resource group for each GraphService resource. This will make viewing the costs easier (see below).

I have a multi-tenanted application. What happens?

Microsoft Graph consumption charges accrue to the owner of the application, whether it’s single tenant or multi-tenant. This means that if you have a multi-tenanted application used by many different tenants, all the charges will come to you!

How can I see what I’m being charged?

Once you have configured your application and subscription for consumption billing the costs will appear in Azure alongside any other charges you have, via the Cost Analysis blade. If you have created your GraphService resources in a separate resource group then it should be easier to separate out the consumption API cost from anything else that’s happening in your tenant.

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.