How does SaaS app know the user is accessing the app in context of existing subscription ?


The scenario is as follows:

As a bank I subscribe to SaaS app offering metered billing.

A user is now redirected to the SaaS App via the bank. 

How does SaaS app know the user is accessing it in the context of the bank’s subscription. 

if there is sample SaaS app code for this scenario that be great help.


to be very specific, how does the SaaS app obtain the subscriptionId to populate the resourceId parameter in this metered billing single usage event API call to Marketplace ?


i have already read this - 


The solution there assumes that buyer and user are the same. But in the case I describe above buyer and user are different. How will the user get the subscription Id obtained by buyer ?

7 Replies
I don't think the user can ever get access to SaaS GUID. It is only for the ISV (I maybe wrong tho)
If the user cannot provide subscription ID how can ISV provide it the service bought. e.g., without the user showing it has the required license how can it use the ISV features that need the license
There are 2 subscription IDs at play here -
1. SaaS GUID which is exposed only to the API (to ISVs)
2. Azure Subscription ID - which is exposed to both user + ISV. While subscribing to a SaaS product, the user will have to choose Az Subscription ID + Az resource group under which the SaaS resource will be created.

@kgola-cflt - So focus on #2 in your reply above. What prevents a user from selecting an incorrect subscription Id ?

In case you're using a Private Offers (tied to a Billing Account and indirectly to an underlying Az Subscription), it will show a hint that you've selected a subscription that's not covered by Private Offers. Other than that, I don't think there is a constraint that ISV can place to stop a user from clicking a particular subscription

Thanks for your contribution - did you have any additional questions on this topic?