Forum Discussion
Get users personal contacts with Powershell for office365/Exchange
- 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!
here, I don't want to export, I just need to user poweshell command for create InboxRule using their personal contact and it will run on Exchange Server .
Example : all user's personal contact's mails will be moved to "Personal Folder" , I can create inbox rule on outlook web but few user's have more than 1000 contact.
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!
- soumenboseMay 26, 2022Copper ContributorThanks Harveer Singh,
Really appreciated all your effort and final output on this.
Sharing user's contact with RW permission is something which breaks security.