-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to refresh token - Error details: Manually created ServicePrincipalToken does not contain secret material to retrieve a new access token #668
Comments
That's a weird error. @adreed-msft Can you please take a look at this on Friday or next week? |
That does seem odd. @jeeva86 Are you authenticating via a certificate or via a secret? That should help me figure out what causes this. |
Furthermore, could you show me the login command/env vars you used (with secret details redacted)? |
I logged in via:
|
The plot thickens-- You are using OAuth and not service principal auth. |
I'll have to investigate what could cause this kind of error to be generated from a typical OAuth token. |
Note that I don't receive this error with azcopy v8, so I've always resorted to using that v. but I can't this time because I need to pull/push into ADLS Gen2 :). |
Doubly odd, You're getting this error on ADLSG2? This error occurs when we're trying to create a blob pipeline, not a blobFS pipeline. |
I get the error there and in Blob(https://fiftypct.blob.core.windows.net). v10 never liked me... |
`azurerm_virtual_machine.tf-vm-test[0]: Still creating... [52m40s elapsed] Error: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for the request to https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/providers/Microsoft.Compute/locations/australiaeast/operations/da4d39bb-b6c5-4f59-9916-60a8edf9c50f?api-version=2019-03-01: StatusCode=0 -- Original Error: Manually created ServicePrincipalToken does not contain secret material to retrieve a new access token on test_tpi_standalone.tf line 117, in resource "azurerm_virtual_machine" "tf-vm-test": Error: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for the request to https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxx/providers/Microsoft.Compute/locations/australiaeast/operations/298d85c7-0fee-4ce9-95f4-4b76e89c4cfa?api-version=2019-03-01: StatusCode=0 -- Original Error: Manually created ServicePrincipalToken does not contain secret material to retrieve a new access token on test_tpi_standalone.tf line 117, in resource "azurerm_virtual_machine" "tf-vm-test": |
Took an hour to provision two VM's which manually can take by 5 minutes. |
@adreed-msft any update on this? |
I'm a bit befuddled, honestly. The latter bit of the error is returned from a SetAuthenticationValues call in ADAL. We attempt to create a service principal token from an OAuth token, which returns a secret type of ServicePrincipalNoSecret. Which means this call could only be triggered during a refresh if your OAuth token somehow contained no refresh information. If the Is it possible you may have disallowed some permissions? |
I used azcopy login to authenticate. What permissions should I be looking for? |
I've just tried to log in under a new account and I didn't see any special prompts... I'm honestly unsure of what might trigger a scenario like this other than the inferred @JohnRusk and @zezha-msft, We can't currently explicitly add any For now though, we can at least error out on azcopy login if no refresh token is available for OAuth. It doesn't FIX this issue, but it'd save us some similar confusion in the future. |
@amishra-dev thoughts on this issue? |
we have the same problem any update? |
Encountered same issue when running terraform to create resources. Any updates on this issue? |
Have you seen this? hashicorp/go-azure-helpers#43
… 4. nov. 2019 kl. 22:33 skrev AnuradhaAshavathaRao ***@***.***>:
Encountered same issue when running terraform to create resources. Any updates on this issue?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@AnuradhaAshavathaRao could you please clarify how is that related to AzCopy? |
I'm still getting this problem btw:
Version 10.5.0 |
For users experiencing this issue: We now have the ability to do a one-shot login with environment variables, including the standard interactive login. This unfortunately isn't a full fix, but it should unblock users. Please view |
Which version of the AzCopy was used? 10.2.1
Which platform are you using? Linux - CentOS 7.6
What command did you run?
./azcopy copy /tmp/hi https://adlsdb2woc.dfs.core.windows.net/datalake/hi --overwrite=false --from-to=LocalBlobFS --cap-mbps 1
What problem was encountered?
azcopy.log
How can we reproduce the problem in the simplest way?
See above
Have you found a mitigation/solution?
No
The text was updated successfully, but these errors were encountered: