ad
ad

User authentication for plugin actions

Science & Technology


Introduction

In this article, we explore user authentication for plugin actions within the Co-Pilot Studio, specifically focusing on how to implement user authentication for actions. Previously, there was only the option for maker authentication, but a recent update enables actions to be performed on behalf of logged-in users, significantly enhancing security.

Getting Started

To illustrate the process of user authentication, let's consider a co-pilot named "My Profile Co-Pilot." We will navigate to the actions section to create a new action called "Get My Profile V2."

Step-by-Step Process

  1. Creating a New Action:

    • Search for the action by entering "Get My Profile V2" in the search bar.
    • Select "Get My Profile V2" from the Office 365 users connector.
  2. Configuring Authentication:

    • In the configuration section for the action, select user authentication.
    • The default is co-pilot offered authentication, but for better user-centric security, switch to user authentication, which requires users to authenticate with the required connection.
  3. Understanding Authentication Types:

    • User Authentication: Requires users to authenticate with the specific connector, ensuring actions are executed on behalf of the user.
    • Co-Pilot Offered Authentication: Uses a single, predefined connection for all actions; not optimal for scenarios where user-specific access is needed, such as retrieving files from a SharePoint library.
  4. Input and Output Settings:

    • In this action, there are no input settings, but 31 outputs are provided.
    • You can enable the option "Respond to a user after running this action" to present a dynamically generated message based on the output.
  5. Finalizing the Action:

    • Save the outputs, and proceed to finish setting up the action.

Testing the User Authentication

After saving the action, you'll see a notification about enabling the co-pilot to respond with the best combination of actions and topics using generative AI. This setup requires an additional topic to trigger the action.

  1. Triggering the Action:

    • Change the generative AI settings to enable it.
    • Test the co-pilot by asking for your profile, which will trigger the action.
  2. User Authentication in Action:

    • If additional permissions are needed, a message will prompt you to select "Connect" to rectify missing connections.
    • Follow the connection prompts for the Office 365 users connector and submit the connection request.
  3. Retrieving User Profile:

    • Once connected, try rerunning the action, and it will fetch and display the details of your user profile.

Conclusion

User authentication enhances the security of actions within Co-Pilot Studio by ensuring actions are executed based on verified user permissions. For further details regarding authentication for actions, you can explore the resources provided below. Don't forget to subscribe to the Microsoft Power Platform channel for updates on future episodes in the series.


Keywords

  • User Authentication
  • Co-Pilot Studio
  • Actions
  • Office 365 Users
  • Security
  • Permissions

FAQ

Q1: What is user authentication in Co-Pilot Studio?
A1: User authentication allows actions to be executed on behalf of logged-in users, enhancing security by ensuring that actions are based on the user’s own permissions.

Q2: How does user authentication differ from co-pilot offered authentication?
A2: User authentication requires each user to authenticate with their own credentials and access permissions, while co-pilot offered authentication uses a predefined connection for all actions regardless of the user.

Q3: What happens if the necessary permissions are not granted by the user?
A3: If permissions are lacking, the co-pilot will prompt the user to connect, showing what connections are missing and allowing them to establish the necessary permissions.

Q4: How can I test the action after setting up user authentication?
A4: You can test the action by asking the co-pilot for your profile. If additional permissions are required, the system will notify you and guide you through connecting to the necessary accounts.