Office 365 Contacts



-->

  1. Microsoft Office 365 Contact Number
  2. How To Download Office 365 Contacts
  3. Office 365 Support
  4. Where Are Outlook 365 Contacts Stored

Many businesses require a shared contact list that is accessible by all users, for example a list of client email addresses and phone numbers. In this article we will create a Shared Contact list in an Office 365 tenant that will be accessible by all staff members with an Office 365 mailbox. You export contacts from Outlook using the Outlook Import and Export Wizard. You can export contacts to a csv file or Excel. Skip to main content. Outlook for Microsoft 365 Outlook 2019 Outlook 2016 Office for business Outlook 2013 Microsoft 365 admin Outlook Web App for Office 365 Outlook 2010 Outlook 2007 Outlook on the web Outlook on the.

Applies to: Exchange Online | Office 365 | Hotmail.com | Live.com | MSN.com | Outlook.com | Passport.com

Note

Version 2.0 of the Outlook REST API is deprecated.

As announced on November 17, 2020, version 2.0 of the Outlook REST API has been deprecated. The v2.0 REST endpoint will be fully decommissioned in November 2022, and the v2.0 documentation will be removed shortly afterwards. Migrate existing apps to use Microsoft Graph. See a comparison to start your migration.

The Outlook Contacts API provides access to a user's contacts and contact folders secured by Azure Active Directory onOffice 365, and to similar data in Microsoft accounts specifically in these domains: Hotmail.com, Live.com, MSN.com, Outlook.com, and Passport.com.

Note

For simplicity of reference, the rest of this article uses Outlook.com to include these Microsoft account domains.

Not interested in v2.0 of the API? In the table of contents on the left, go to the Office 365 REST API reference section and select the version you want.

All Contacts API operations

Contact operations

Contacts are stored in contact folders. You can get, create, change, and delete contacts.

Contact folder operations

Contact folders can contain contacts and other contact folders. You can get contact folders and create contacts in a contact folder.

Contact photo operations

Each contact can have an optional contact picture. You can get or set a photo for a contact.

See also

Using the Contacts REST API

Authentication

Like other Outlook REST API, for every request to the Contacts API,you should include a valid access token. Getting an access token requires you to have registered and identified your app, and obtained the appropriate authorization.

You can find out more about some streamlined registration and authorization options for you. Keep this in mind as you proceed with the specific operations in the Contacts API.

Version of API

The Contacts REST API is supported in all versions of the Outlook REST API. The functionality may differ depending on the specific version.

Target user

The Contacts API requests are always performed on behalf of the current user.

See Use the Outlook REST API for more information common to all subsets ofthe Outlook REST API.

Get contacts

You can get a contact collection or an individual contact from a contact folder.

Minimum required scope

One of the following:

  • wl.basic

Get a contact collection

Get a contact collection from the default Contacts folder of the signed-in user (.../me/contacts), or from the specified contact folder.

Required parameterTypeDescription
URL parameters
contact_folder_idstringThe contact folder ID, if you're getting contacts from a specific folder.

Note

By default, each contact in the response includes all its properties. Use $select to specify only those properties you need for best performance. The Id property is always returned. See OData query parameters for filtering, sorting, and paging parameters.

Sample request

Sample response

Response type

The requested contact collection.

Get a contact

Minimum required scope

One of the following:

  • wl.basic

Get a contact by using the contact ID.

Required parameterTypeDescription
URL parameters
contact_idstringThe contact ID.

Sample request

Sample response

Response type

The requested contact.

Note

By default, the response includes all the properties of the contact. Use $select to specify only those properties you need for best performance. The Id property is always returned. See OData query parameters for filtering, sorting, and paging parameters.

The following example shows how to use $select to specify returning only the EmailAddresses, GivenName and Surname properties of the contact in the response.

Sample request

Sample response

Synchronize contacts and contact folders

You can synchronize your local list of contacts with the contacts on the server. Contacts synchronization is a per-folder operation, for example you can synchronize all of the contacts in your root Contacts folder. If you have additonal Contacts folders, you need to synchronize each folder individually.

Synchronization only supports full synchronization; all contacts in the specified folder are returned with each request.

Synchronizing a contacts folder typically requires two or more GET requests. You make the GET request much like the way you get contacts, except that you add the following request headers.

  • You must specify the Prefer: odata.track-changes header in all of your sync requests.

  • You may specify the Prefer: odata.maxpages={n} header to set the maximum number of contacts returned in each request.

    The second and subsequent GET requests differ from the first GET request by including either a deltaToken or a skipToken received in a previous response.

    The initial response to a sync request always returns a deltaToken. You should always make a second GET request using the deltaToken to determine if there are any additional contacts. The second request will return additional contacts and either a skipToken if there are more contacts available, or a deltaToken if the last contact was sent.

Minimum required scope

One of the following:

  • wl.basic
Required parameterTypeDescription
Header parameters
Preferodata.track-changesIndicates that the request is a synchronization request.
Preferodata.maxpagesizeSets the number of contacts returned in each response.
URL parameter
folderNamestringThe name of the folder to synchronize.
odata.deltaLinkStringThe token that indicates the last time that the folder was synchronized.
odata.skiptokenStringThe token that indicates that there are more messages to download.

Response type

A collection containing the requested contacts and a deltaToken that you use to request additionalpages of contact data from server and to request an incremental synchronization. If the number ofcontacts returned is more than the value specified in the odata.maxpagesize header the responsewill be returned in multiple pages.

The response will include a Preference-Applied: odata-trackchanges header. If you attemptto sync a resource that is not supported, this header will not be returned in the response.Check for this header before processing the response to avoid errors.

Note

By default, the response includes all of the properties of the specified contacts. Use $select to specify only the properties that your need for best performance. The Id property is always returned. Do not use $filter, $orderby, $search or $top as they are not supported for synchronizing contacts or contact folders. See OData query parameters for further details.

Examples

Inital request for a full synchronization:

Include the following headers:

  • Prefer: odata.track-changes
  • Prefer: odata.maxpagesize=100

Second request to the server after a full synchronization request:

Include the following headers:

  • Prefer: odata.track-changes
  • Prefer: odata.maxpagesize=100

Second response from the server with additional pages available:

Header

Preference-Applied: odata.track-changes

Body

@odata.deltaLink=https://outlook.office.com/api/v2.0/me/Contacts/messages/?%24skiptoken=169ca50467d34d9fb8adb664961b9836

Payload messages


Second or subsequent response from the server when all contacts have been sent:

Header

Preference-Applied: odata.track-changes

Body

@odata.deltaLink=https://outlook.office.com/api/v2.0/me/Contacts/?%24deltatoken=169ca50467d34d9fb8adb664961b9836

Payload messages


Request to server when additional pages are available:

Include the following headers.

  • Prefer: odata.track-changes
  • Prefer: odata.maxpagesize=100

Create contacts

Create a contact in the specified Contacts folder.

Create a contact

Minimum required scope

One of the following:

  • wl.contacts_create

Add a contact to the root Contacts folder or to the contacts endpoint of another contact folder.

Required parameterTypeDescription
URL parameters
contact_folder_idstringThe contact folder ID, if you're creating a contact in a specific contact folder.
Body parameters
GivenNamestringThe given name of the contact.

Specify the GivenName parameter and any writable contact properties in the request body.

Sample request

Sample response

Response type

The new contact.

Update contacts

Change a contact's properties.

Update a contact

Minimum required scope

One of the following:

  • wl.contacts_create

Specify any writable contact properties in the request body. Only the properties that you specify are changed.

Required parameterTypeDescription
URL parameters
contact_idstringThe contact ID.

Sample request

Sample response

Response type

The updated contact.

Delete contacts

Delete a contact. Deleted contents might not be recoverable.

Office 365 Contacts

To learn more, see Deleting items by using EWS in Exchange.

Delete a contact

Minimum required scope

One of the following:

  • wl.contacts_create
Required parameterTypeDescription
URL parameters
contact_idstringThe contact ID.

Sample request

Sample response

Get contact folders

You can get a contact folder collection or get a contact folder.

Get a contact folder collection

Minimum required scope

One of the following:

  • wl.basic

Get the contact folder collection under the default Contacts folder of the signed-in user (.../me/contactfolders), or under the specified contact folder.

Note

See OData query parameters for filtering, sorting, and paging parameters.

Required parameterTypeDescription
URL parameters
contact_folder_idstringThe contact folder ID, if you're getting contact folders from a specific contact folder.

Sample request

Sample response

Status code: 200

Response type

The requested contact folder collection.

Get a contact folder

Microsoft Office 365 Contact Number

Minimum required scope

One of the following:

  • wl.basic

Get a contact folder by using the contact folder ID.

Note

See OData query parameters for filtering, sorting, and paging parameters.

Required parameterTypeDescription
URL parameters
contact_folder_idstringThe contact folder ID.

Sample request

Sample response

Response type

The requested contact folder.

Get contact photo and metadata

Get contact photo

Minimum required scope

One of the following:

  • wl.basic

Get the photo of the specified signed-in user's contact.

Required parameterTypeDescription
URL parameters
contact_idstringThe ID specifying the particular contact of the signed-in user's.

Sample request

Response data

Contains the binary data of the requested photo. The HTTP response code is 200.

The operation returns HTTP 404 if the contact does not already have a contact photo on Exchange Online.

Get contact photo metadata

Minimum required scope

One of the following:

  • wl.basic

Get the metadata of a contact photo, which includes the content type, width and height in pixels.

Required parameterTypeDescription
URL parameters
contact_idstringThe ID specifying the particular contact of the signed-in user's.

Sample request

Sample response data

A successful request returns HTTP 200.

Set contact photo

Minimum required scope

One of the following:

  • wl.contacts_create

Assign a photo to the specified signed-in user's contact. The photo should be in binary. It replaces any existing photo for that contact.

You can use PATCH or PUT for this operation in version 2.0.

How To Download Office 365 Contacts

Required parameterTypeDescription
URL parameters
contact_idstringThe ID specifying the particular contact of the signed-in user's.

Sample request

Include the binary data of the photo in the request body.

Response data

A successful request returns HTTP 200.

Next steps

Whether you're ready to start building an app or just want to learn more, we've got you covered.

Office 365 Support

  • Get started with Mail, Calendar, and Contacts REST APIs.
  • Want samples? We've got them.

Or, learn more about using the Office 365 platform:

-->

Import or migrate email from Gmail or another email provider to Microsoft 365.

Want help with this?Contact Microsoft 365 for business support .

You need to use a version of Outlook that is installed on your desktop for this task. Outlook is included in most Microsoft 365 plans.

Migrate Gmail to Microsoft 365

Follow these steps to import or migrate email, contacts, and calendar from Gmail into Outlook with Microsoft 365:

Import Outlook pst files to Microsoft 365 (desktop)

Follow these steps to export email, contacts and calendars from Outlook to a .pst file, and then import that file to Outlook with Microsoft 365:

If you just want contacts, follow these steps:

To start the process, open Outlook and choose File > Open & Export > Import/Export.

See other email accounts in Outlook

Just want to see your email from another provider (like Gmail, Yahoo, or Live.com) in Outlook? No need to import or migrate. You can set up Outlook or Outlook Web App so you can access your other accounts from the same place as your Microsoft 365 mailbox and send, receive, and read email sent to those accounts.

Outlook (desktop)

Add an account, such as your private Gmail account, to Outlook.

  • Open Outlook, then go to File > Add account.

Need more detailed steps? See Add an account.

Multiple mailboxes: Admins can bulk import email, contacts, and calendars to Microsoft 365

Where Are Outlook 365 Contacts Stored

Depending on your source email system, you can choose from several bulk migration methods. Read Ways to migrate multiple email accounts to Microsoft 365 to decide which method works for you.