Include a SaaS offer with your Teams app
With a transactable Software-as-a-Service (SaaS) offer, you can monetize your Teams app by selling subscription plans directly from your Teams store listing. For example, say you have a free app anyone can get in the store. Now you can offer premium and enterprise plans for users who want more features.
Here's a general idea of how to monetize your app:
Plan your SaaS offer
For comprehensive guidance, see how to plan a SaaS offer for the Microsoft commercial marketplace.
When planning how to monetize your Teams app, here are some things to consider:
- Decide on your subscription model. A transactable SaaS offer can include multiple subscription plans. Public subscription plans available to anyone are most common, but you may also want to target specific customers with deals only for them. For more information, see private plans in the Microsoft commercial marketplace.
- Read about the Sell through Microsoft listing option for your SaaS offer, which is required if you want users to purchase subscription plans for your app directly through the Teams store.
- Learn how Azure Active Directory single sign-on (SSO) helps your customers purchase and manage subscriptions. (Microsoft Azure Active Directory (Azure AD) SSO is required for Teams apps with SaaS offers.)
- Understand that you're responsible for managing and paying for the infrastructure required to support your customers' use of your SaaS offer.
- Plan for mobile. To avoid violating third-party app store policies, your app can't include links that allow users to purchase subscription plans on mobile. However, you can still indicate if your app has features that require a subscription plan. For more information, see the related commercial marketplace certification policies.
Integrate with the SaaS Fulfillment APIs
Integrating with the SaaS Fulfillment APIs is required for monetizing your Teams app. These APIs help you manage the lifecycle of a subscription plan once it’s purchased by a user.
For complete instructions and API reference, see the SaaS Fulfillment APIs documentation. In general, you’ll implement the following steps using the APIs once a subscription is purchased:
Receive a purchase identification token via the URL to your landing page.
Use the token to retrieve subscription details.
Notify the commercial marketplace that the subscription is activated.
Best practices for implementing subscription management
- With transactable SaaS offers for Teams apps, subscription plans (licenses) should be assigned to individual users rather than groups or an entire org.
- When users are assigned a subscription plan, notify them through a Teams bot or email. In the messaging, include information on how to add the app to Teams and get started.
- Support the idea of multiple admins. In other words, multiple users in the same org can purchase and manage their own subscriptions.
Manage license for third party apps in Teams
Teams allows independent software vendors (ISVs) admins or users to manage SaaS licenses for third party apps purchased from Teams storefront. ISV admins or users can easily assign, unassign, use, and track SaaS licenses.
To enable license management for an app in Teams, follow the steps:
- Create an offer in Partner Center
- Update your Teams app
- Post purchase
- Integrate with Graph Usage Right API
Create an offer in Partner Center
Sign in to Partner Center and select Partner Center.
In the Home page, select Marketplace offers tab to define commercial marketplace offers.
Select Overview from the left pane.
Select New Offer > Software as a Service.
Enter Offer ID and Offer alias and select Create.
Note
If you're creating an offer for testing purpose, add the text -ISVPILOT to the end of your offer alias. This indicates the certification team that the offer is for testing purposes. Microsoft delete offers with -ISVPILOT periodically. So, don't use this tag for reasons other than testing the license management capability.
In Offer setup page, under setup details, select the checkbox Yes, I would like Microsoft to manage customer licenses on my behalf.
Note
- This is a one-time setting and you can't change it once your offer is published. This allows the customer to manage licenses for your app within Teams.
- The App manifest supports only one offer for an app. Choose an appropriate license management solution for all the plans available in your offer and you can't change this option after the offer is pushed to live.
Select Save draft.
Select Plan overview from the left pane, and then select Create new plan.
Note
You need to add at least one plan.
Enter Plan ID and Plan name, and then select Create.
Enter the Plan name and Plan description.
Note
The plan information displays on Teams marketplace and Appsource under offer listing (plans section).
Select Save draft.
Select Pricing and availability from the left pane.
Add pricing and availability details.
Select Save draft.
Select Plan overview at the top of the page to go to the listing page that shows all the plans you've created for this offer.
Copy the service ID of the plan you created to integrate with Microsoft Graph Usage Rights API.
Update your Teams app
Update your Teams app to map to the paid functionality and Map your Teams app to your offer and publish.
Post purchase
After activation, customer is redirected from landing page to Teams License Management.
Upon successful completion of subscription purchase, the customer is redirected to the app landing page for subscription activation. This is the existing experience for user purchasing monetized apps in Teams.
After the customer activates the subscription purchase on landing page, customer is redirected to subscriptions page in Teams via a redirect URL link or button that the customer selects on the publisher landing page.
Integrate with Graph Usage Right API
Integrate with Graph Usage Right API to manage user permissions at the time of app launch by a customer who has a purchase license. You're required to determine the user’s permissions for the app with a Graph call to the Usage Rights API.
You can call Graph APIs to determine if the currently logged in user with a valid subscription of the plan has access to your app. To call Graph UsageRight API to check user permissions, follow the steps:
Get user OBO token: Get access on behalf of a user - Microsoft Graph | Microsoft Docs.
Call Graph to get user’s object ID: Use the Microsoft Graph API - Microsoft Graph | Microsoft Docs.
Call UsageRights API to determine the user has License to the plan List user usageRights - Microsoft Graph beta | Microsoft Docs.
Note
You need to have minimum
User.Readpermissions to call UsageRights. The UsageRights API is currently in beta version. After the version is updated to V1, ISV users should upgrade from beta to V1 version.
Check license usage in Partner Center analytics
- Sign in to Partner Center.
- In the left pane, go to Commercial Marketplace > Analyze > Licensing.
- Select Plan and Tenant in the reporting widget to see the month wise usage.
Build a landing page for subscription management
When someone finishes buying a subscription plan for your app in the Teams store, the commercial marketplace will direct them to your landing page where they can manage the subscription (such as assign a license to a specific user in their org).
Select No, I would prefer to manage customer licenses myself in such cases.
For complete instructions, see build the landing page for your SaaS offer.
When someone finishes buying a subscription plan for your app and wants to stay in the Teams, without directing them to your landing page, select Yes, I would like Microsoft to manage customer licenses on my behalf.
For more information, see first party license management.
Best practices for landing pages
Consider the following approaches when building a landing page for the Teams app you’re monetizing. See an example landing page in the end-user purchasing experience.
- Users must be able to sign in to your landing page with the same Azure AD credentials they used to buy the subscription. For more information, see Azure AD and transactable SaaS offers in the commercial marketplace.
- Allow users to take the following actions on your landing page. Don’t forget to consider what’s appropriate for a user’s role and permissions. For example, you may want to allow only subscription admins to search for users):
- Search for users in their org using email or another form of identity.
- See users they can assign licenses to in a list.
- Assign licenses to one or multiple users at the same time.
- Assign and manage different types of licenses (if available).
- Validate if a license is already assigned to another user.
- Cancel their subscription.
- Provide an introduction on how to use your app.
- Add ways to get support, such as an FAQ, knowledge base, or contact email.
- Provide a link that makes it easy for the subscriber to get back to the landing page. For example, include this link in your app’s About tab.
Create your SaaS offer
Once you’ve integrated the SaaS Fulfillment APIs and built your landing page where users can manage their subscriptions, it's time to officially create, test, and publish your transactable SaaS offer.
Create the offer
See create a SaaS offer for complete instructions on how to do this in Partner Center. The following steps describe what to do at a high level.
Create a Partner Center account if you don’t have one.
Configure the subscription plans, pricing details, and more for your transactable SaaS offer. In particular, make sure you complete the following steps:
Under Setup details, select the Yes option to specify that you’re selling the offer through Microsoft.
Under Microsoft 365 integration, add the AppSource link to your app listing. This step ensures people can buy your subscription plans in AppSource in addition to Teams.
Store your publisher and offer IDs. (You need them later to link the offer to your app in the Developer Portal.)
Publish your offer to the commercial marketplace.
Test the offer
We recommend that you verify the end-to-end purchasing experience before publishing your SaaS offer. You can verify by creating a separate offer just for testing. For complete information, see test offer overview, create a test offer, and preview your offer.
Important
You can test an end-to-end transaction in Teams using the Test preview for monetized apps feature. For live offers you must complete the app store validation process.
From a Teams standpoint, these tests must verify that the number of licenses and assignments match what’s in the Teams admin center when users:
- Activate and configure their subscription plan on your landing page.
- Assign, remove, or reassign licenses to themselves or others.
- Cancel or renew their subscription.
Publish the offer
Once you finish testing, publish your offer live.
Configure your app for the SaaS offer
You’ve published your SaaS offer, but you still must link it to your Teams app for users to see your subscription plans in the Teams store.
Go to the Developer Portal and select Apps.
On the Apps page, select the app you're linking the SaaS offer to.
Go to the Plans and pricing page and specify your publisher and offer IDs. (You can find these IDs in Partner Center if you don't have them readily available.)
Select View to preview your SaaS offer's subscription plans.
If everything looks good, select Save.
The
subscriptionOfferproperty is added to your app manifest."subscriptionOffer": { "offerId": "publisherId.offerId" }
Publish your app
You’ve created your SaaS offer and linked it to your Teams app—now it's time to publish your app to the Teams store. For complete instructions, see publish your app to the Teams store.
Important
- Even if your app is already listed on the Teams store, you still must go through the store validation process again to include your SaaS offer.
- Flat rate offers created without the Offer ID and Publisher ID in the app manifest should be updated and resubmitted for validation.
Once published, users will see a Buy a subscription option in the app details dialog when they try to add your app to Teams.
End-user purchasing experience
The following example shows how users can purchase subscription plans for a fictional Teams app called Recloud.
In the Teams store, find and select the Recloud app.
In the app details dialog, select Buy a subscription.
Select your country to see subscription plans for your location.
In the Choose a subscription plan dialog, choose the plan you want and select Checkout. (Note: Private plans are visible only to users in orgs you're providing the offer to. These plans are indicated with a Special offer
icon.)
In the Checkout dialog, provide any required information and select Place order.
When prompted, select Set up now to set up your subscription.
Manage your subscription plan through the Recloud website (also known as a landing page).
Admin purchasing experience
Admins can purchase app subscription plans in the Teams admin center.
Remove a SaaS offer from your app
If you unlink a SaaS offer included in your Teams store listing, you must republish your app to see the change in the store.
- Go to the Developer Portal and select Apps.
- On the Apps page, select the app you're removing the offer from.
- Go to the Plans and pricing page and select Revert.
- Once the offer's unlinked, do the following to update your store listing:
- Select Distribute > Publish to the Teams store.
- Select Open Partner Center to begin the process of republishing your app without the offer.
See also
Feedback
Submit and view feedback for