API to get foreign exchange rates from partner center

Sashko Micov 6 Reputation points
2021-07-07T08:39:02.813+00:00

We are attempting to use the API call detailed from
https://learn.microsoft.com/en-us/partner/develop/get-foreign-exchange-rates
to get foreign exchange rates and have followed the prerequisites for setting up an App Registration with the correct permissions and access.

we are getting aad token, after that use that token to get new token from partner center,

we can use this token for all other partner center api's except for https://api.partner.microsoft.com/v1.0/sales/fxrates(Month='201909')/$value

where we are getting this error:
{
"statusCode": 401,
"message": "Unauthorized: Invalid Authorization header"
}

can someone please advice what can be the problem, thanks.

Microsoft Partner Center API
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Qiongkai Ye 6 Reputation points
    2022-11-11T12:21:24.933+00:00

    If you have added all the required permissions, you're probably requesting the tokens against https://api.partnercenter.microsoft.com instead of https://api.partner.microsoft.com
    For more information: https://stackoverflow.com/a/69913674/12069467

    1 person found this answer helpful.
    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.