Get-PartnerAzureBillingAccount fails 'Unauthorized'
See original GitHub issueSteps to reproduce
When executing the cmdlet is fails. I am using refresh token. Token is scoped to ‘https://api.partnercenter.microsoft.com/user_impersonation’. The user that is impersonated has Global Admin and Admin agent access. Debug does not return different result.
Get-PartnerAzureBillingAccount
Get-PartnerAzureBillingAccount : Operation returned an invalid status code 'Unauthorized'
At line:1 char:1
+ Get-PartnerAzureBillingAccount
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-PartnerAzureBillingAccount], ErrorResponseException
+ FullyQualifiedErrorId : Microsoft.Azure.Management.Billing.Models.ErrorResponseException,Microsoft.Store.PartnerCenter.PowerShell.Commands.GetPartnerAzureBillingAccount
What steps can reproduce the defect? Please share the setup, commandline for vstest.console, sample project, target framework etc.
Expected behavior
Share the expected output
Actual behavior
What is the behavior observed?
Diagnostic logs
Please share test platform diagnostics logs.
The logs may contain test assembly paths, kindly review and mask those before sharing.
Environment
Please share additional details about your environment. Version
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:20 (8 by maintainers)
Top Results From Across the Web
PartnerCenter.Exception 'Unauthorized access' using app ...
So I am using the Peek CSP Billing example to do custom billing for our CSP clients. I had this working using app+user...
Read more >Troubleshoot Azure enterprise cost views
Learn how to resolve any issues you might have with organizational cost views within the Azure portal.
Read more >Troubleshoot issues when you sign up for a new account in ...
Resolving an issue when trying to sign up for a new account in the Microsoft Azure portal.
Read more >Manage access to billing information for Azure
Sign in to the Azure portal. · Search on Cost Management + Billing. · If you have access to just one billing scope,...
Read more >Troubleshoot common Cost Management errors
When you use Cost Management in the Azure portal and encounter an error that you don't understand or can't resolve, find the error...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The documentation has been updated and with the release of version 3.0 a more meaningful error will be thrown in this circumstance. Also, when you invoke a command and specify the
Debug
parameter you will now see details regarding the actual HTTP request which will help identify the root cause of issues more rapidly.@isaiahwilliams If this is the better solution for authenticating may be it is better to documented it somewhere. I will switch to this way of authenticating so we can put this best practice at place. To clarify connecting to Azure via Az stays the same as there is no refresh token option there correct?