Error calling Partner Center API 500

Manuel Bustamante 42 Reputation points
2023-06-13T06:48:50.5+00:00

Dears,

I'm struggling creating a power automate that can retrieve all the certifications/trainings existing in my company. I have created an enterprise application with the following api permissions:

partner_center_app

I also gave this application all possible roles in Partner Center as described here https://learn.microsoft.com/en-us/partner-center/insights-programmatic-first-api-call

partner_center_roles

I managed to create a power automate which seems to get correctly an access token but when I call the rest api https://api.partnercenter.microsoft.com/insights/v1/mpn/ScheduledQueries as described here https://learn.microsoft.com/en-us/partner-center/insights-programmatic-first-api-call#step-2-create-a-custom-query I'm getting a 500 error:

Http request failed with error code 'Forbidden'. Request url: https://rpe-uiinfrastructure-prod.trafficmanager.net/v1/accessCheck, error response content: {"code":65002,"description":"AADSTS65002: Consent between first party application 'fa3d9a0c-3fb0-42cc-9193-47c7ecd2edbd' and first party resource '00000002-0000-0000-c000-000000000000' must be configured via preauthorization - applications owned and operated by Microsoft must get approval from the API owner before requesting tokens for that API.

Trace ID: 5eac0d42-bbe5-4a70-a9d8-5b99fd7c0000
Correlation ID: 550d3c02-c23b-4fe7-813d-c540c67ec269
Timestamp: 2023-06-13 06:20:14Z","data":[],"source":"PartnerApiServiceControllers"}

Here below my Power Automate flow:

partner_center_api

Any input is highly appreciated.

Kr,

Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
328 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Pascal Kiefer 0 Reputation points
    2024-01-13T07:26:52.77+00:00

    Hi Manuel
    I'm having the same issue. Have you found a solution for this?
    I've noticed that the app mentioned in the error message (fa3d9a0c-3fb0-42cc-9193-47c7ecd2edbd) isn't the one that I manually created and used as clientId in the API call. Is this also the case for you?


  2. Manuel Bustamante 42 Reputation points
    2024-01-13T10:31:32.2833333+00:00

    Hi @Pascal Kiefer

    After creating a support ticket in Azure they told me the following:

    "At this moment the API of the partner center is not supported for Indirect Reller as you can see in the official documentation:  Getstarted with Partner Center APIs - Partner app developer | Microsoft Learn.

    Please refer to your PDM to see if there is some benefits related to the ISV program from you to use."

    So, all these APIs do not work for all partners. As you can see in the link here above it says:
    "Microsoft is introducing a secure, scalable framework for authenticating cloud solution provider (CSP) partners and control panel vendors (CPV) through the Microsoft Azure multi-factor authentication (MFA) architecture."