Use the Authenticate action to authenticate the session to your 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.

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. Go to Actions > SharePoint > Authentication, and double-click Authenticate to add the action.
  4. Click Pick to choose the pre-configured OAuth connection from the Pick an OAuth connection modal.
    For more details, see Configure OAuth connections in Control Room.
    Note: The OAuth2 - Client Credentials authentication method for SharePoint packages is not supported due to Microsoft Azure ACS retirement. For more details, see Azure ACS deprecation.
    The Control room OAuth connection method is chosen by default as it is the only supported authentication type.
  5. Select one of the following from the API drop-down.
    • SharePoint REST API: Select this option if you have set up SharePoint OAuth connection based on SharePoint REST API.
    • Microsoft Graph API: Select this option if you have set up the SharePoint OAuth connection based on Microsoft Graph API.
  6. Perform one of the following to define the SharePoint domain settings in Domain
    • Cloud: Select this option and specify the Subdomain and Site name if you are using SharePoint cloud.

      The SharePoint site URL is the following format: https://{subdomain}.sharepoint.com/site/{SiteName}.

    • Custom: Select this option and specify the URL and Site name if you are using SharePoint on-premise.

      The SharePoint site URL is the following format: https://{url}/site/{SiteName}.

    The Site name field is optional. The Site name you enter in the Authentication action is set as the default site for the other actions in this package. If required, you can enter a different site name for the individual actions.
  7. Enable the Teams site check box to connect to a SharePoint teams site.
    By enabling the Teams site checkbox, you can connect to team-based managed paths of SharePoint 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 version 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. Select one of the following options in the Create SharePoint session field to define the SharePoint session:
    • Local session: Select this option to define a session name for the current bot only.
    • Global session: Select this option to define a session name that can be used in other parent and child bots.
      Recommendation: The parent and child bots should have the same package version.
    • Variable: Select this option to choose or create a Session variable. You can use this variable in other actions also.
When you run the bot, the Authenticate action authenticates the connection to the SharePoint domain.