1

REST API I am using:

_api/web/lists/getbytitle('listname')/items(100)?$select=Initiator/EMail,RAReviewers/EMail&$expand=Initiator/Id,RAReviewers/Id

In this RaReviewers column is a Person/Group. It contains one Person and one group, if all are persons it works fine, but with having group it's not working.

2
  • What are you trying to fetch from column? Are you getting any error while using this API? Commented Jun 11, 2021 at 15:54
  • [Solved] I replaced RAReviewers/EMail - RAReviewers/Name and it returns key value which works for me
    – AJ.
    Commented Jun 12, 2021 at 14:49

1 Answer 1

1

Try using this:

_api/web/lists/getbytitle('listname')/items(100)?$select=Initiator/EMail,RAReviewers/EMail&$expand=Initiator,RAReviewers

Above is working fine for me in case of person or group.

Example:

/_api/web/lists/getbytitle('TestList')/items(1)?$select=TestPersonField/Title,TestPersonField/EMail&$expand=TestPersonField

Output: Below is part of response returned from above API call

<entry>
    <content type="application/xml">
        <m:properties>
            <d:Title>Ganesh Sanap</d:Title>
            <d:EMail>[email protected]</d:EMail>
        </m:properties>
    </content>
</entry>
<entry>
    <content type="application/xml">
        <m:properties>
            <d:Title>SPConnect Members</d:Title>
            <d:EMail>[email protected]</d:EMail>
        </m:properties>
    </content>
</entry>

Where SPConnect Members is a Microsoft 365 group name.

Note: This will not work for SharePoint groups as they don't have Email property.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.