Azure / Commercial-Marketplace-SaaS-Accelerator

A reference example with sample code for developers interested publishing transactable, Software as a-Service offers in the Microsoft commercial marketplace.
MIT License
193 stars 290 forks source link

what are the changes required to "Fetch all subscriptions" #607

Closed NareshkumarBT closed 10 months ago

NareshkumarBT commented 10 months ago

what are the changes required to "Fetch all subscriptions" When i clicked on "Fetch all subscriptions" im facing below exception. Also, what is resource in appsettings.json under saasapiconfiguration

Exception Service request failed. Status: 403 (Forbidden)

Content: "The authorization token is invalid, expired, missing or this request is attempting to access a SaaS subscription for an offer that was published with a different Azure AD App ID from the one used to create the authorization token. Please make sure the authorization token is created using the same Azure AD App ID as the Azure AD App ID Id set for the offer in Technical Details tab in Partner Center."

Headers: Set-Cookie: REDACTED mise-correlation-id: REDACTED x-ms-requestid: REDACTED x-ms-correlationid: REDACTED X-Content-Type-Options: REDACTED X-Powered-By: REDACTED X-Cache: REDACTED X-Azure-Ref: REDACTED Date: Thu, 23 Nov 2023 07:45:48 GMT Content-Length: 403 Content-Type: application/json; charset=utf-8.

code4clouds commented 10 months ago

Hi @NareshkumarBT - If the SaaS Accelerator was working before and the token expired. There is a video covering this here: https://microsoft.github.io/Mastering-the-Marketplace/saas-accelerator/#replacing-application-secrets-for-the-saas-accelerator

NareshkumarBT commented 10 months ago

Hi @code4clouds - I went through the provided link, but unfortunately my keyvault was not expired. Also this is my initial setup and im facing this issue.

code4clouds commented 10 months ago

The next things to check is 1) to confirm the Client Application ID and Tenant ID matches the technical configuration on Partner Cetner. 2) And that the Offer was submitted for publication for this change to apply.

santhoshb-msft commented 10 months ago

@NareshkumarBT please let us know if you were able to resolve this. If not I recommend, raising a support request partner center for more help with saas offer technical requirements.

NareshkumarBT commented 10 months ago

Hi @santhoshb-msft

Thanks a lot!! It is working now, i can able to fetch all my subscriptions.