This command is available for Office 365 users. OAuth authentication (OAuth2 protocol) is used to access SharePoint files.
Once authenticated, this command will list all SharePoint sites that can be addressed using the OAuth2 token obtained.
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('SHRDPTLIST') |
CHGVAR |
VAR(&PARM1)
VALUE(' ;ClientSecretVal="client secret" ;Tenant="tenant" ;Detailed=true/false |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Paramètres |
|
Parm1 ou Parm2 |
ClientIdVal : Client ID. Useful for authentication.
ClientSecretVal : Client Secret. Useful for authentication.
Tenant : Tenant. Useful for authentication. Detailed : True/False (default). If False, the command returns a list of site URLs, separated by semicolons. If True, the file "list_sharepoint_sites.txt" will be created in the %TEMP% directory of the Windows PC/Server hosting the Launcher/400 server. For
each site, the file will contain the following elements: |
Example
The following example lists all SharePoint sites that can be addressed using the obtained OAuth2 token.
LNCCMD CMD(SHRDPTLIST) +
PARM1('clientIdVal="45ai88a7-8f43-1289-b698-45ca+
23c87a84";clientSecretVal="Odf9Q~ecCrfgGAPv+
N8df89cxb7dx52df7CVBLbaI";Tenant="a2f8vf56-+
2178-4da9-b478-2fe147a5";Detailed=true')
Here is an example of the contents of the "%TEMP%\list_sharepoint_sites.txt" file generated when the parameter Detailed=true:
- Internal name : SalesandMarketing
- URL : https://aura.sharepoint.com/sites/SalesandMarketing
- ID : aura.sharepoint.com,fb686d99-0fbd-4e0e-2224-d7ad7cb8745f,abe22aaa-1962 - - Displayed name : Sales and Marketing
--------------------------------------------------
- Internal name : Retail
- URL : https://aura.sharepoint.com/sites/Retail
- ID : aura.sharepoint.com,e5fb8c77-111d-4992-b35d-a542d9c0ee72,abe22aaa-1962-- Displayed name : Retail
--------------------------------------------------