Partner central rest api unauthorized access

Copper Contributor

I followed the Microsoft doc to get the billing profile of a customer.
With the auth [tutorial] I deployed following Powershell Code

`$credential = Get-Credential
Connect-PartnerCenter -Credential $credential -ServicePrincipal -TenantId '<TenantId>'`

I than copied the access token and produced a Postman Get request but still got an 401 unauthorized request

It could be from the security update of Microsoft , but the Auth documentation is from january so i think These are the steps to get access to the partner central

Or I don't have the right permissions as a user to get the billing profile.
I know it's one step that I oversee or that it's one thing that I did wrong but I can't see it

I am aware that there are some questions online about this issue. But Can't seem to find a solution there.


[Edit ] Tried to access the bearer token by firstly accessing the refresh token via this powershell code

 $credential = Get-Credential$token = New-PartnerAccessToken -Consent -Credential $credential -Resource https://api.partnercenter.microsoft.com -ServicePrincipal

 But keep getting following error : 
enter image description here

 

Even when i added the URL in the redirect URL setting:

enter image description here
Is there someone who already tried this or sees what i am missing here ?

0 Replies