Using Connect action in Microsoft 365 OneDrive package

Use the Connect action in the Microsoft 365 OneDrive package to establish a connection with the Microsoft 365 server using your organization's (client ID and tenant ID) and user credentials.

Prerequisites

All the fields in the Connect action accepts a credential from the Credential Vault or a user-input value.
Note: Note the following conditions for the Connect action:
  • Does not currently support MFA or SSO.
  • Ensure that the administrator consent for the permissions is granted.
  1. Log in to the Azure portal using your Microsoft 365 credentials.
  2. Register your application with the Microsoft identity platform to obtain the client ID and tenant ID. See Register your app.
  3. Grant the required permissions for Microsoft Graph to the application.

    See Permissions for application.

    Note: For your app registration on Azure portal, navigate to Authentication > Advanced Settings > Allow public client flows and ensure that you select Yes.
  4. To add a client secret, you must first subscribe to Azure. See Subscribe to Azure.
  5. Add a client secret. See Add a client secret.

For an example on how to setup and connect to the Microsoft 365 OneDrive package, see Setup Azure App to connect using Microsoft OneDrive package (A-People login required).

Procedure

  1. In the Actions palette, double-click or drag the Connect action from the package you want to use.
  2. In the Microsoft 365 OneDrive user session field, enter a session name.
    (Optional) Click the Insert a value icon to select an existing variable.
    Note: Enter this session name in subsequent actions in this package.
  3. Click the OAuth2 Authentication Mode to select one of the options:
    • Control Room managed
      Use the following fields to update the information:
      • Connection: click the Pick button to select an existing connection.
        • Click the Provider type drop-down menu to select an available or custom provider.

          For information in creating a custom provider, see Configure OAuth 2.0 connection in Control Room.

        • Click the Connection name to select the corresponding connection for the selected provider.
        • Use the Token type field to select one of the following options:
          • Shared: for a global token.

            An access token of shared type is created when a connection is established to the Control Room. This access token is stored as a credential. When you run your automation, the access token is referenced in the automation using the enterprise application provider type set up in the Control Room.

          • User-specific: for a token that is specific to a user.
            If you select this option, ensure that you log in to your Microsoft 365 account to authenticate and generate a user-specific token. Perform the following steps to use this option:
            1. Log in to Control Room and navigate to My settings > OAuth connections in your profile.
            2. Under the OAuth connections tab, click Login to authenticate.
            3. Sign in to your Microsoft 365 account and select Continue.
            4. Verify the services you have access to and click Continue.

              If the connection is succeeded, it will display the status as Active under the OAuth connections > Connections table.

      • Click one of the following tabs in the Username field:
        • Credential: click the Pick button to select a value in the Credential Vault that contains information about the username.
        • Variable: to use a user-defined variable that contains information about the username.
        • Insecure string: to enter a value.
    • ROPC
      Use the following fields to enter the information that is provided for your account on your Azure portal
      • Client ID: enter the Microsoft 365 client ID or insert it from the Credential Vault.
      • Tenant ID: enter the unique ID for your Microsoft 365 subscription or insert it from the Credential Vault.
      • Username: enter the username that you want to use for accessing Microsoft 365 OneDrive.
      • Password: specify the Microsoft 365 password:
      • Client secret: enter your access token or insert it from the Credential Vault.
      For all the above fields, you can use one of the following tabs to insert a value:
      • Credential: to use a value in the Credential Vault that contains information about the Client ID/Client secret/ username/ password..
      • Variable: to use a user-defined variable that contains information about the Client ID/Client secret/ username/ password.
      • Insecure string: to enter a value.

  4. Click Save.