Forum Discussion
SX
Feb 18, 2025Copper Contributor
The term 'New-MailContact' is not recognized
Hi Support, I am trying to bulk import external contacts to the tenant. I have come across several other Q&As which have the similar issue. However, the issue is slightly different - I have assigne...
Feb 19, 2025
The New-Mailcontact cmdlet should be available after running Connect-ExchangeOnlineManagement.
What version of the module are you using? I'm using 3.7.0
- AP_TC_ECASDFeb 23, 2025Copper Contributor
New-MgContact and New-MgUserContact are cmdlets in Microsoft Graph PowerShell, but they serve different purposes:
- New-MgContact:
- This cmdlet is used to create a new organizational contact in Microsoft 365. Organizational contacts are typically used for external contacts that are not part of the organization but need to be available in the directory for communication purposes1.
- Example usage:New-MgContact -DisplayName "John Doe" -Mail "email address removed for privacy reasons"
- New-MgUserContact:
- This cmdlet is used to create a new personal contact for a specific user in Microsoft 365. Personal contacts are managed by individual users and are not shared across the organization2.
- Example usage:New-MgUserContact -UserId $userId -DisplayName "Jane Smith" -EmailAddresses @{Address="email address removed for privacy reasons"; Name="Jane Smith"}
In summary, New-MgContact is for organizational contacts, while New-MgUserContact is for personal contacts managed by individual users.
- New-MgContact: