SharePoint authenticate action

Use the Authenticate action to connect to your cloud SharePoint domain. After the authentication is successful, you can use the other command actions to perform various operations in SharePoint.

Prerequisites

Note: The examples and graphics provided on this page are for representation purposes only and may not accurately reflect your specific instance. We do not assume responsibility for their maintenance or accuracy.
  • You must have the client ID and client secret generated for your SharePoint domain. To generate the client details, see SharePoint package.
  • You must have the Bot Creator role for your Automation Anywhere Control Room to use the SharePoint package in a bot.
You can use different connection methods to connect to SharePoint:
  • OAuth2 - Client Credentials: Use this connection method by providing the SharePoint credentials.
  • Control room OAuth connection: Use this connection method by creating an OAuth connection and storing it in the Control Room.

Procedure

  1. Log in to the Automation Anywhere Control Room.
  2. You can create a new bot or modify an existing bot. For more details, see Create your first bot.
  3. From the Actions pane, select SharePoint > Authenticate and place it under the start of the bot flow.
  4. In the Authentication Type field, select the authentication method from the drop down.
    Note: To connect using Control room OAuth connection, pick a custom connection you have created and stored in the Control Room. For more details, see Configure OAuth connections in Control Room.

    SharePoint authenticate action
  5. To connect using OAuth2 - Client Credentials, complete the following steps:
    1. In the Client ID field, enter the client ID copied from SharePoint. This example uses Insecure string however, you can use Credential or Variable options for better security.
    2. In the Client secret field, enter the client secret copied from SharePoint.
    3. In the Tenant ID field, enter the tenant ID copied from SharePoint. To view the tenant ID, go to https://{your_sharepoint_domain}/_layouts/15/AppPrincipals.aspx. Replace {your_sharepoint_domain} with your SharePoint domain name. In the App identifier column, the tenant ID is displayed after the @ symbol as shown in the following image:

      Tenant ID in SharePoint
      Note: You can use one of the following options to specify the Client ID/Client secret/ Tenant ID:
      • Credential: Enables you to use a value in the Credential Vault that contains information about the client ID/client secret/tenant ID.
      • Variable: Enables you to use a credential variable that contains information about the client ID/client secret/tenant ID.
      • Insecure string: Enables you to enter the client ID/client secret/tenant ID as a string.
  6. In the Domain field.
    • Enter the SharePoint subdomain name.
    • Enter the site name.
      Note: The site name you provide in the authentication action will be the default site selected for the other actions in this package. You can provide a different site name for the individual actions as well.
  7. Select the Teams site check box to connect to a SharePoint teams site. By enabling the Teams site checkbox, you can connect to Sharepoint's Team based managed paths and perform operations.
    Note:
    A managed path is a location within a SharePoint web application in which you can have site collections. Managed paths allow you to specify a path users will use to access your site contents. By default, SharePoint Online provides two managed paths:
    • sites: This managed path is used for creating site collections, and the URLs for site collections created using this path follow this format: https://<yourdomain>.sharepoint.com/sites/<sitename>.
    • teams: This managed path is used for creating modern team sites, and the URLs for team sites created using this path follow this format: https://<yourdomain>.sharepoint.com/teams/<sitename>.
  8. In the Create SharePoint session field, select one of the following options:
    • Local session: You can use the local session name only for the current bot.
    • Global session: You can use the global session name in other parent and child bots.
      Recommendation: The parent and child bots should have the same package version.
    • Variable: You can add the session name to a variable and use the variable in other actions.
You are successfully authenticated to the SharePoint domain.