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 |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
You can pass the
username
andpassword
of an account to authenticate with, into theo365 login
command as shown below.o365 login --authType password --userName [email protected] --password pass@word1
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 …