Partner Centre API

Danny Broadhurst 6 Reputation points
2022-09-14T06:47:37.23+00:00

Hi,

I am trying to use the following API call: Get a customer's service costs line items
https://learn.microsoft.com/en-us/partner-center/develop/get-a-customer-s-service-costs-line-items

I can see that it doesn't support the standalone authentication that other API calls do and you have to use the App+User credentials method.
When I try use the Web App in partner Center App Management I get a 403 This resource can't be accessed by application credentials error.

I have registered a new Native app through the Partner Centre and followed these instructions to grant permissions in Azure AD. (https://learn.microsoft.com/en-us/partner/develop/api-authentication) However I am still getting the same 403 error.

I am running out of ideas now on what to try next.

I am using Postman to send the GET request.

URL: https://api.partnercenter.microsoft.com/v1/customers/{CUSTID}/servicecosts/mostrecent/lineitems
AUTH: Bearer {TOKEN}

The Token was obtained by using a POST request on the following URL
URL: https://login.microsoftonline.com/{PARTNERID}/oauth2/token
Body:

Any help is greatly appreciated.

Thanks,
Danny

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.
345 questions
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Sébastien Jutras 0 Reputation points
    2023-03-03T15:55:52.3233333+00:00

    Good day, i am facing the exact same issue. Were you ever able to resolve this?

    0 comments No comments

  2. Roel Gillesen 0 Reputation points
    2023-10-05T14:01:54.62+00:00

    I'm able to retrieve the token with the following:

    Unfortunately the call to the API gives me a 99999 error.

    {
        "error": {
            "code": "accessDenied",
            "message": "The caller doesn't have permission to perform the action.",
            "innerError": {
                "code": "99999",
                "message": "GenericError",
                "details": null
            }
        }
    }
    
    0 comments No comments

  3. Miroslav Karpíšek 0 Reputation points
    2024-07-23T12:38:03.3566667+00:00

    Have someone been able to successfully authenticate and be than able to use the Bearer token within the Partner Center API?

    0 comments No comments

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.