Good day, i am facing the exact same issue. Were you ever able to resolve this?
Partner Centre API
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:
- client_id - {APPID}
- client_secret - {APPSECRET}
- grant_type - client_credentials
- resource - https://graph.windows.net
Any help is greatly appreciated.
Thanks,
Danny
3 answers
Sort by: Most helpful
-
-
Roel Gillesen 0 Reputation points
2023-10-05T14:01:54.62+00:00 I'm able to retrieve the token with the following:
- client_id - {APPID}
- client_secret - {APPSECRET}
- grant_type - client_credentials
- resource - https://api.partner.microsoft.com
- tenant_id - {TENANTID}
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 } } }
-
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?