Cannot Get API Management Subscription Info from Another User

Michael Gonzalez (Contractor) 26 Reputation points
2022-09-19T14:32:11.947+00:00

We are self-hosting our own PaperBits site and have customized it a bit. We want to be able to, using an 'Administrator' account on the same API Management service, get subscription keys and client secrets from other API Management service users but I get a 401 when attempting to do so. Is there a way to do this or not? We need to be able to get this info using a super-user-like account. Please let me know if this is possible, and if so, how. Btw, we are using the MapiClient in PaperBits code to retrieve this info. Thanks!

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,075 questions
0 comments No comments
{count} votes

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 22,311 Reputation points
    2022-09-20T15:13:56.05+00:00

    @Michael Gonzalez (Contractor) Thank you for reaching out to Microsoft Q&A. Based on my understanding you are self-hosting developer portal with your own PaperBits and want to get subscription keys of developers who sign-in and sign-up for the portal?

    Have you looked at REST API Subscription - List and Subscription - List Secrets?

    1. Subscription - List will list the subscription Id along with user and product info.
    2. You can use Subscription - List Secrets to get the specific subscription keys.

    If you get 401 error, please make sure that the user has permissions like below to perform the action. Refer https://learn.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftapimanagement if you prefer to create custom role or built-in roles.

    243043-image.png

    Alternatively, there is an option to delegate user registration and product subscription which allows own user data and validation. I hope this answers your question but please correct me if I misunderstood your question.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.