Forum Discussion

soumenbose's avatar
soumenbose
Copper Contributor
May 24, 2022

Get users personal contacts with Powershell for office365/Exchange

Hi All, I am trying to retrieve user's personal contact on outlook web . I have tried with following cmdlets but non of them giving the list of contacts.   Get-Contact Get-Addresslist Get-MailC...
  • harveer singh's avatar
    harveer singh
    May 26, 2022

    soumenbose Unfortunately, there is no easy way to achieve this, traditional exchange powershell module wont expose specific contacts to you, i havent looked into it but you can take a look at the graph api module here: https://docs.microsoft.com/en-us/graph/api/contact-get?view=graph-rest-1.0&tabs=http 

    Going by the example you gave, you can create a Personal Contact list for each mailbox, you should be able to select all contacts and add them to the personal list in one go, now you can create an outlook rule for the specific list; personal contact lists arent supported as such in outlook rules but outlook will expand it to include all the members for the rule, but again this would require constant updating; so would the graph api one. Sorry, out of ideas here!

Resources