Is there azure blob credentials info json file example?

Is there azure blob credentials info json file example?

What and what parameters should I put in?

Does this help?

It shows how to create the JSON file.

Does azure cli have to be used to get json files?

I don't know... That was the way the Azure expert who wrote the docs recommended. I expect there are other ways - maybe you can download the JSON from the portal? If you find you can then we can adjust the docs.

Yes, when I downloaded the json, I checked that it is downloaded in the following data format.

{
"RoleAssignmentId": "1234-1234-1234-1234-1234",
"Scope": "/subscriptions//resourceGroups//providers/Microsoft.Storage/storageAccounts//blobServices/default/containers/",
"DisplayName": "",
"SignInName": "<SignInName == Domain User Name>",
"RoleDefinitionName": "Storage Blob Data Owner",
"RoleDefinitionId": "/subscriptions//providers/Microsoft.Authorization/roleDefinitions/",
"ObjectId": "",
"ObjectType": "User"
}

And does that work properly with rclone?

If so we should mention that in the docs

It doesn't work.
It continues to ask for ClientID, but even if it is executed by entering a random value in the Client value, it continues to ask for ClientID. Client_ID, ClientID, clientid... etc. are also the same. Should I post it as an issue on GitHub?

Can you post the output from rclone please?

======================================================

C:\rclone>rclone --version
rclone v1.54.0

  • os/arch: windows/amd64
  • go version: go1.15.7

C:\rclone>rclone mount azureblob:/ y: --allow-other --allow-non-empty --fast-list --drive-skip-gdocs --poll-interval=15s --vfs-cache-mode full --vfs-write-back 5s --bwlimit-file 16M --buffer-size=16M --vfs-read-chunk-size=32M --vfs-read-chunk-size-limit 2048M --vfs-cache-max-size 100G --vfs-cache-max-age 336h --vfs-read-ahead 32M --dir-cache-time=1000h --cache-dir=/volume1/cache
2021/03/12 10:07:53 NOTICE: --allow-non-empty flag does nothing on Windows
2021/03/12 10:07:53 NOTICE: --allow-other flag does nothing on Windows
The service rclone has been started.

======================================================

C:\rclone>rclone config
Current remotes:

Name Type
==== ====
azureblob azureblob
blobtest azureblob
test webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> e
Choose a number from below, or type in an existing value
1 > azureblob
2 > blobtest
3 > test
remote> 2

[blobtest]
type = azureblob
account = <<ACCOUNT_NAME>>
service_principal_file = C:\rclone\azureblob.json

Edit remote
** See help for azureblob backend at: Microsoft Azure Blob Storage **

Value "account" = "<<ACCOUNT_NAME>>"
Edit? (y/n)>
y) Yes
n) No (default)
y/n>
Value "service_principal_file" = "C:\rclone\azureblob.json"
Edit? (y/n)>
y) Yes
n) No (default)
y/n>
Value "key" = ""
Edit? (y/n)>
y) Yes
n) No (default)
y/n>
Value "sas_url" = ""
Edit? (y/n)>
y) Yes
n) No (default)
y/n>
Value "use_msi" = ""
Edit? (y/n)>
y) Yes
n) No (default)
y/n>
Value "use_emulator" = ""
Edit? (y/n)>
y) Yes
n) No (default)
y/n>
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n>

[blobtest]
type = azureblob
account = <<ACCOUNT_NAME>>
service_principal_file = C:\rclone\azureblob.json

y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
Remote config
Current remotes:

Name Type
==== ====
azureblob azureblob
blobtest azureblob
test webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>

C:\rclone>rclone mount blobtest:/ h: --allow-other --allow-non-empty --fast-list --drive-skip-gdocs --poll-interval=15s --vfs-cache-mode full --vfs-write-back 5s --bwlimit-file 16M --buffer-size=16M --vfs-read-chunk-size=32M --vfs-read-chunk-size-limit 2048M --vfs-cache-max-size 100G --vfs-cache-max-age 336h --vfs-read-ahead 32M --dir-cache-time=1000h --cache-dir=/volume1/cache
2021/03/12 10:11:14 Failed to create file system for "blobtest:/": failed to create a service principal token: error creating service principal token: parameter 'clientID' cannot be empty

image

and

image

=================================

C:\rclone>rclone mount blobtest:/ h: --allow-other --allow-non-empty --fast-list --drive-skip-gdocs --poll-interval=15s --vfs-cache-mode full --vfs-write-back 5s --bwlimit-file 16M --buffer-size=16M --vfs-read-chunk-size=32M --vfs-read-chunk-size-limit 2048M --vfs-cache-max-size 100G --vfs-cache-max-age 336h --vfs-read-ahead 32M --dir-cache-time=1000h --cache-dir=/volume1/cache
2021/03/12 10:35:27 Failed to create file system for "blobtest:/": failed to create a service principal token: error parsing credentials from JSON file: json: cannot unmarshal array into Go value of type azureblob.servicePrincipalCredentials

=================================

hmm.....

I opened the source and checked and modified the json value, but a 403 error occurred, and I will check this again.

I have an additional question. I want to use Azure AD, but I want to access each user. This appid is information used as a group in Azure AD. Is there any way to do it as an individual user?

image

I fork and edit the source directly and go build, but I don't know if the option exists. I can't test myself..

=====================
C:\opensource\rclone>rclone mount blobtest:/ h: --allow-other --allow-non-empty --fast-list --drive-skip-gdocs --poll-interval=15s --vfs-cache-mode full --vfs-write-back 5s --bwlimit-file 16M --buffer-size=16M --vfs-read-chunk-size=32M --vfs-read-chunk-size-limit 2048M --vfs-cache-max-size 100G --vfs-cache-max-age 336h --vfs-read-ahead 32M --dir-cache-time=1000h --cache-dir=/volume1/cache
Error: unknown command "mount" for "rclone"
Run 'rclone --help' for usage.
You could use 'rclone selfupdate' to get latest features.

2021/03/12 15:12:58 Fatal error: unknown command "mount" for "rclone"

I reinstalled WinFsp (full install) and installed Mingw to set the path and test. I'm getting a directory error in Azure with error 400, but I'm watching a little more. Do you have any contributors who have worked on Azure?

I just checked the code - the service principal file should have these elements

{
"appId" : "",
"password": "",
"tenant" : "",
}

This is where the client ID setting goes - it is in the advanced config

https://rclone.org/azureblob/#azureblob-msi-client-id

This support for the JSON file was put in in this PR

You could ask the author there for help if you can't get it to work.

Are you still having these issues?