Get RelatedContacts data

Jeroen Cools 21 Reputation points
2022-12-30T14:03:34.17+00:00

I'm working on a small PowerShell project that allows an admin to search for a user, get all the related contacts (https://learn.microsoft.com/en-us/graph/api/resources/relatedcontact?view=graph-rest-beta) and upate them. I can easily set new information for an edu user (https://learn.microsoft.com/en-us/graph/api/relatedcontact-update?view=graph-rest-beta&tabs=http) but "getting" that information back seems not possible atm? Does anyone know a way to get the related contact info of a user so I can use it in my tool?

275025-gui-parents.png

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Answer accepted by question author
  1. Bhanu Kiran 3,616 Reputation points
    2022-12-30T21:26:43.803+00:00

    Hi @Jeroen Cools ,

    Using $select query parameter I was able to get relatedContacts property

    GET https://graph.microsoft.com/beta/education/users/<userID>/?$select=relatedContacts  
    

    275030-relatedcontacts.png

    Please check and validate the same.

    Hope this helps

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.