A reusable Power Platform snippet

Office 365 Users: Get Manager (Action)

This is a snippet that demonstrates how to get your manager details using the Office 365 Users action.

Copilot Studio
Preview PNG
Last updated
Sep 15, 2024
Category
Community snippet

From idea to implementation

Make it your own.

Check this snippet's prerequisites, permissions, and licensing before using it. The documentation below comes directly from the snippet README.

This is a snippet that demonstrates how to get your manager details using the Office 365 Users action. It uses an adaptive card as an output to not only display your manager details but to also start a Teams chat with them.

Office 365 Users: Get Manager Action example

You can also customize the adaptive card to include more information from your manager.

Authors

Snippet Author(s)
Office 365 Users: Get Manager (Action with Adaptive Card) Gomolemo Mohapi (@GomoMohapi)

Minimal path to awesome

  1. Open a copilot in Copilot Studio

  2. Select Actions

  3. Select + Add an action

  4. Search for Get manager and press Enter

  5. Select the Get manager (V2) action from the Office 365 Users connector

  6. Select Next

  7. Select Next again

  8. Select Finish

  9. Select the Office 365 Users - Get manager (V2) action in the list (select the name)

  10. Select the ... in the upper right corner and select Open code editor

  11. Make sure to look for and copy the name of the connection reference

    Connection reference name

  12. Replace all the code in the code editor with the contents of this YAML-file

  13. Replace { REPLACE-WITH-CONNECTION-REFERENCE-NAME } with the connection reference name you copied two steps earlier

  14. Save the action.

  15. Select Settings on the top right corner

  16. Select Generative AI

  17. Under Using generative AI in conversations, select Generative

  18. Select Save and then exit Settings by selecting the X in the upper right corner

  19. Open the Test your copilot panel

  20. Refresh the Test your copilot panel to get the latest changes

  21. Test out the action by asking get my manager or something similar:

    Office 365 Users: Get Manager Action example

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.