Microsoft Graph Unified Contacts List

441 views Asked by At

Is it possible to create Exchange contacts list which will be shared across the whole organisation using Graph API? These contacts are not the part of the organisation.

I know we can add contact to user's contact list, however was not able to find a way to have a contact which will be shared across the whole organisation.

POST /me/contacts
POST /users/{id | userPrincipalName}/contacts
POST /me/contactFolders/{contactFolderId}/contacts
POST /users/{id | userPrincipalName}/contactFolders/{contactFolderId}/contacts

I am aware that contacts are shared if the contact is within organisation and if they are in Active Directory Domain Services (AD DS). However these contacts are outside of the org.

2

There are 2 answers

0
mxr7350 On

While this does not answer my question directly, one of the solutions would be to have a user which will serve as a master containing all contacts.

This way contacts list would be accessible using following Graph call

GET /users/{id | userPrincipalName}/contacts

The downside of this approach is that whenever new contact is added to personal list it would need to be added to this list as well.

2
Glen Scales On

Mail Enabled directory contacts (which are stored in AD) are available using the organizational contacts endpoint https://learn.microsoft.com/en-us/graph/api/orgcontact-list?view=graph-rest-1.0&tabs=http. However they don't allow you to create Org contacts in the Graph there's a uservoice request for this https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests/suggestions/38083912-make-it-possible-to-create-organizational-contacts (but not looking good at getting this changed)

So the Exchange cmldets are still the only real way of doing this programatically https://learn.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps

eg

New-MailContact -Name "Chris Ashton" -ExternalEmailAddress "[email protected]"