PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > ONEDRIVPUT command
ONEDRIVPUT command

This command is available for Office 365 users. OAuth authentication (OAuth2 protocol) is used to access OneDrive files.

In order to authenticate, you must provide the following elements to the command :

- Microsoft Entra ID tenant ID: Tenant parameter

- Caller’s application client ID: ClientIdVal parameter

- Application’s secret value: ClientSecretVal parameter

Of course, this information will not appear in the Launcher trace.

For more information, go see this chapter of our documentation

Moreover, here is a link to the Microsoft documentation. 

 

Syntax

 

CHGVAR

 

VAR(&CMD) VALUE('ONEDRIVPUT')

CHGVAR

VAR(&PARM1) VALUE('
UserId="UPN address of the owner of the OneDrive location"
;ClientIdVal="client ID"

;ClientSecretVal="client secret"

;Tenant="tenant"

;FilePath="Full path of the file to be uploaded to OneDrive"
')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

 

  Parameters

 

Parameters

 

Parm1

Parm2

UserId : UPN address of the owner of the OneDrive location where you want to upload a file.

 

ClientIdVal : Client ID. Useful for authentication.

 

ClientSecretVal : Client Secret. Useful for authentication.

 

Tenant : Tenant. Useful for authentication.

 

FilePath : Full path of the file to be uploaded to OneDrive.

 

Example

 

The following example illustrates uploading a file to the OneDrive of user AdeleV@aura.dev.com:

https://aura-my.sharepoint.com/:b:/g/personal/adelev_aura_dev_com/

 

adelev_aura_dev_com : this is the transformed email address (UPN).
All special characters (@, ., etc.) are replaced by underscores _.

Example :
AdeleV@aura.dev.com becomes
adelev_aura_dev_com

 

 

LNCCMD     CMD(ONEDRIVPUT) +                            

             PARM1('userID="AdeleV@aura.dev.com+

             ";clientIdVal="45ai88a7-8f43-1289-b698-45ca+

             23c87a84";clientSecretVal="Odf9Q~ecCrfgGAPv+

             N8df89cxb7dx52df7CVBLbaI";Tenant="a2f8vf56-+

             2178-4da9-b478-2fe147a57fe9";FilePath="C:\A+

             \FFD.PDF"')