Comments on: Creating Personal Contacts in User Mailboxes with PowerShell and the Graph https://practical365.com/create-org-contacts-powershell-graph/ Practical Office 365 News, Tips, and Tutorials Wed, 01 Nov 2023 18:10:11 +0000 hourly 1 https://wordpress.org/?v=6.3.2 By: M365 guy https://practical365.com/create-org-contacts-powershell-graph/#comment-279390 Wed, 01 Nov 2023 18:10:11 +0000 https://practical365.com/?p=52227#comment-279390 is it possible to pull the existing (specific) contacts from user and add them to a folder automatically ?

]]>
By: Tony Redmond https://practical365.com/create-org-contacts-powershell-graph/#comment-263990 Mon, 22 May 2023 16:12:42 +0000 https://practical365.com/?p=52227#comment-263990 In reply to Neil.

Here is the Graph documentation for the properties supported by a contact:

https://learn.microsoft.com/en-us/graph/api/resources/contact?view=graph-rest-1.0#properties. Business phones is listed as a string collection, so you should be able to pass a set of numnbers.

I’m on vacation for the next two weeks, otherwise I would look further.

]]>
By: Neil https://practical365.com/create-org-contacts-powershell-graph/#comment-263971 Mon, 22 May 2023 11:43:21 +0000 https://practical365.com/?p=52227#comment-263971 Hi Tony,

I’m trying to create new contact records for employee emergency contacts. So need to add multiple phone numbers but it appears MSGraph v1.0 doesn’t support Assistant’s Phone and I’ve scoured the internet for example of how to update Business Phone, Business Phone 2, Business Phone 3, Home Phone, Home Phone 2 and so on without success.

Am I looking for something that doesn’t exist?

]]>
By: Tony Redmond https://practical365.com/create-org-contacts-powershell-graph/#comment-254103 Thu, 16 Feb 2023 13:06:26 +0000 https://practical365.com/?p=52227#comment-254103 In reply to Lloyd.

No idea. I haven’t done any research to know how to answer that question.

]]>
By: Lloyd https://practical365.com/create-org-contacts-powershell-graph/#comment-254101 Thu, 16 Feb 2023 13:00:53 +0000 https://practical365.com/?p=52227#comment-254101 Hi Tony, how could we save the contacts into a designated contact folder as opposed to the default using this script?

]]>
By: Lloyd https://practical365.com/create-org-contacts-powershell-graph/#comment-254029 Wed, 15 Feb 2023 11:48:11 +0000 https://practical365.com/?p=52227#comment-254029 In reply to Tony Redmond.

Hi Tony, that has worked! Thank you!

]]>
By: Tony Redmond https://practical365.com/create-org-contacts-powershell-graph/#comment-254023 Wed, 15 Feb 2023 10:41:27 +0000 https://practical365.com/?p=52227#comment-254023 In reply to Lloyd.

I think the issue that you might be running into is that the Mail Contact object returned by Exchange Online doesn’t include a mobile phone property. It has a Phone property, but not a mobile phone. Personal contacts of the type stored in your mailbox do support a mobile phone property. If you stored the mobile phone number in another property supported by the cmdlet, you’d be able to retrieve it.

Get-ExoRecipient -Identity Jack.Smith -PropertySet All | Fl *Phone*

Phone : +353 1 1947 144

]]>
By: Lloyd https://practical365.com/create-org-contacts-powershell-graph/#comment-254020 Wed, 15 Feb 2023 10:16:06 +0000 https://practical365.com/?p=52227#comment-254020 Hi Tony,

I am trying to include mobile numbers in this script and getting intermittent results. I have added mobilePhone to the contact object but it’s not including them. Any ideas?
$ContactObject = @”
{
“assistantName”: “$($Assistant)”,
“businessHomePage”: “$($HomePage)”,
“businessPhones”: [
“$($Phone)”],
“mobilePhone”: “$($MobilePhone)”,
“companyName”: “$($Company)”,
“department”: “$($Department)”,
“displayName”: “$($DisplayName)”,
“emailAddresses”: [
{
“address”: “$($Email)”,
“name”: “$($Displayname)”
}
],
“givenName”: “$($First)”,
“jobTitle”: “$($Title)”,
“middleName”: “$($Middle)”,
“nickName”: “$($Nickname)”,
“profession”: “$($Profession)”,
“personalNotes”: “$($OrgNotes)”,
“surname”: “$($Last)”,
“title”: “$($Saluation)”
}
“@

]]>
By: Tony Redmond https://practical365.com/create-org-contacts-powershell-graph/#comment-253716 Sat, 11 Feb 2023 21:14:09 +0000 https://practical365.com/?p=52227#comment-253716 In reply to Sascha.

I updated https://github.com/12Knocksinna/Office365itpros/blob/master/PopulateOrgContacts.PS1 to make the check for existing mailbox contacts better. Maybe it will help.

]]>
By: Tony Redmond https://practical365.com/create-org-contacts-powershell-graph/#comment-253712 Sat, 11 Feb 2023 20:40:35 +0000 https://practical365.com/?p=52227#comment-253712 In reply to Sascha.

That line just creates a PowerShell list object. It has nothing to do with creating contacts.

]]>