Comment 25 for bug 1680523

Revision history for this message
Tommy Falgout (lastcoolnameleft) wrote : Re: [Bug 1680523] Re: add-credential azure fails

Andrew,

Here's the error I'm currently receiving:

➜ juju git:(develop) juju add-credential --logging-config '<root>=TRACE'
--log-file=/tmp/azure-sp.log azure
Enter credential name: test

A credential with that name already exists.
Replace the existing credential? (y/N): y

Auth Types
  interactive
  service-principal-secret

Select auth type [interactive]:

Enter subscription-id: df8428d4-bc25-4601-b458-1c8533ceec0b

Initiating interactive authentication.

To sign in, use a web browser to open the page https://aka.ms/devicelogin
and enter the code BR7E33R4Y to authenticate.

Authenticated as "Tommy Falgout".
Creating/updating service principal.
ERROR finalizing credential: creating service principal: max duration
exceeded: ad.ServicePrincipalsClient#Create: Failure responding to request:
StatusCode=0 -- Original Error: autorest/azure: Service returned an error.
Status=404 Code="Request_ResourceNotFound" Message="Resource
'ServicePrincipal_5741d8b8-922e-496e-83a5-75cca9ae590d' does not exist or
one of its queried reference-property objects are not present."

I've pushed the logs here:
http://lastcoolnameleft.com/mini/azure.log

Perhaps increasing the timeout? Is there something I can do to increase
that myself to test?

On Fri, May 5, 2017 at 3:16 AM Andrew Wilkins <email address hidden>
wrote:

> Tommy, I neglected to ask you before: my PR (mentioned in comment #21)
> has landed. Would you mind seeing if this resolves the issues you have
> seen with interactive add-credential?
>
> I've not been able to reproduce the error myself, but this PR makes Juju
> follow what is done in the Azure CLI.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1680523
>
> Title:
> add-credential azure fails
>
> Status in juju:
> Fix Committed
>
> Bug description:
> I am receiving the following error when running "juju add-credential
> azure". I have tried two different subscription ID's, both have the
> same issue.
>
> Sign In
> Sorry, but we’re having trouble signing you in.
> We received a bad request.
>
> Additional technical information:
> Correlation ID: 9da27091-d4a3-4e93-81e0-41e016d8276a
> Timestamp: 2017-04-06 16:01:06Z
> AADSTS90093: Calling principal cannot consent due to lack of permissions.
>
> To reproduce the problem:
>
> ➜ ~ juju add-credential azure
> Enter credential name: test
> A credential with that name already exists.
>
> Replace the existing credential? (y/N): y
> Auth Types
> interactive*
> service-principal-secret
>
> Select auth-type: interactive
> Enter subscription-id: <removed>
> Initiating interactive authentication.
>
> To sign in, use a web browser to open the page
> https://aka.ms/devicelogin and enter the code <removed> to
> authenticate.
>
> -- Go to link
>
> Enter the code that you received from the application on your device
>
> Juju CLI Application publisher: Click cancel if you received this code
> from a different application
>
> -- Click Continue
>
> -- Enter credentials
>
> Sorry, but we’re having trouble signing you in.
> We received a bad request
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1680523/+subscriptions
>
>