Unable to get the user's manager using Office365Users.ManagerV2() connector

john john 946 Reputation points
2021-09-17T17:42:58.787+00:00

I have 2 SharePoint People or Group fields which allow single selection. one field represents the User (DateCardValue6) and the other field represents the Manager. now inside the manager field i disabled the field + i added this formula inside the DefaultSelectedItems, as follow:-

133150-manager.png

but when i run the form and i select a value inside the User field, nothing will be shown inside the manager.. any advice? Although the user has a manager inside AD.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,692 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,675 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Allen Xu_MSFT 13,776 Reputation points
    2021-09-20T05:50:32.967+00:00

    Hi @john john ,

    Set the DefaultSelectedItems of Manager combobox Property to:

    {  
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
        Claims: "i:0#.f|membership|" & Office365Users.ManagerV2(DataCardValue2.Selected.Email).mail,  
        Department: "",  
        DisplayName: Office365Users.ManagerV2(DataCardValue2.Selected.Email).displayName,  
        Email: Office365Users.ManagerV2(DataCardValue2.Selected.Email).mail,  
        JobTitle: "",  
        Picture: ""  
    }  
    

    Note: replace DataCardValue2 - User Combobox with your own

    Sample:
    133481-image.png

    Save and publish it to your SharePoint site.

    Test result in my SharePoint list form.
    133409-demo.gif


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.