If you are working with SharePoint Online, we recommend switching to Microsoft Graph Connection, which fully supports Modern Authentication.
First, you will have to set up your own app on Azure Portal, and then from the app you created, use your app credentials during token generation, like client_id, client_secret and tenantId.
When generating the token, enter the required Scopes based on your business needs. The default is: offline_access Sites.ReadWrite.All Files.ReadWrite.All Files.ReadWrite and generally described as follows:
- Token Refresh use: offline_access
- SharePoint lists use: Sites.ReadWrite.All
- File Transfer Task with SharePoint use: Files.ReadWrite.All Files.ReadWrite
Authentication Types and
Required Permissions
1. OAuth2 (Delegated
Access Flow)
This is a user-based method where a user signs in through an interactive prompt, allowing the
application delegated permissions to access data on their behalf. The
connection securely stores the resulting access and refresh tokens for reuse.
Required Parameters:
• client_id – Application (Client) ID
• client_secret – Application Client Secret
• tenant – Directory (Tenant) ID
• scope – The set of permissions being requested
• token – The location (file or database) to store the generated token
2. Service (App-Only
Access - Client Secret)
This
is a machine-to-machine authentication method that uses the Client
Credentials Flow. The application authenticates itself by using its
Application ID and a secure Client Secret. This method is ideal for unattended,
server-side automation.
Required Parameters:
• tenant – Directory (Tenant) ID
• appID – Application (Client) ID
• appSecret – Application Client Secret

3. Certificate (App-Only
Access - Certificate)
This
is a secure, non-interactive authentication method that replaces the
Client Secret with an X.509 certificate when using the Client
Credentials Flow. The certificate’s public key must be registered with the
application in Microsoft Entra ID.
Required Parameters:
• tenant – Directory (Tenant) ID
• appID – Application (Client) ID
• certificate
file – The path to the .pfx certificate file
• password – The password for the certificate file (if applicable)

Additional Resources: