question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get-PartnerAzureBillingAccount fails 'Unauthorized'

See original GitHub issue

Steps 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Dec 6, 2019

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.

1reaction
slavizhcommented, Nov 28, 2019

@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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found