Run a batch script with CLI commands with Delegated Permissions #1767
|
I registered a new App through Azure SPO rights. I would like to execute a batch script with CLI commands from linux machine to upload file from Linux to SharePoint. Is it possible to use Delegated Permissions and login with AppId Secret without prompting user credentials ? Thanks |
Replies: 1 comment 2 replies
|
You can pass the
This will not prompt for authentication and will enable you to use Delegated Permissions; however, the account that you use must have MFA disabled. If disabling MFA is not an option for you, we would recommend that you login to Office 365 CLI using the Certificate option, or if your Linux machine is hosted in Azure you can use Managed Identity. As both authentication types do not execute commands in the context of a user, they only support Application Permissions. We currently do not support Client Id and Secret authentication. |
You can pass the
usernameandpasswordof an account to authenticate with, into theo365 logincommand as shown below.o365 login --authType password --userName user@contoso.com --password pass@word1This will not prompt for authentication and will enable you to use Delegated Permissions; however, the account that you use must have MFA disabled.
If disabling MFA is not an option for you, we would recommend that you login to Office 365 CLI using the Certificate option, or if your Linux machine is hosted in Azure you can use Managed Identity. As both authentication types do not execute commands in the context of a user, they only support Application Permissions.
We currently do not support …