Hero Banner

Microsoft AppSource and Azure Marketplace

Learn how to grow your business by publishing your cloud solution on Microsoft AppSource and Azure Marketplace

Visitor 1

SaaS sell through Microsoft - check user subscription



How to check if user have subscription to SaaS service?


Initial data

1. SaaS service sell in Microsoft AppSource

2. SaaS sell through Microsoft

In Microsoft AppSource SaaS offer have "Would you like to sell through Microsoft?" setted to true.

3. SaaS Fulfillment APIs is used. landing Page is implemented


4. User successfully get subscription, SaaS successfully use SaaS Fulfillment APIs to activate user subscription. User start use SaaS.



This routine is implemented

- When SaaS get request, SaaS redirect user browser to Azure AD login page.

- User login with his work accaunt.

- Azure AD login page redirected user browser back to SaaS and provide information about user:

tenantId, userId


Here is question

- SaaS service must check user subscription.

How to check user subscription?



See this options:

Option 1

- Use SaaS Fulfillment APIs List subscriptions method to get all subcriptions

- Iterate all subcriptions and compare "beneficiary"."tenantId" with User.tenantId


This way we can check if user tenant have subscription.

But what if our "Pricing Model" is "per user"? We cannot check that exectly this user from tenant have subscription.


Option 2

- Use Microsoft Graph REST API methods

-- User. List licenseDetails

-- User. assignedLicense

-- User. assignedPlans

Wich one? Will be our subscription list there?