How do I retrieve global contacts using the MS EWS Managed API? - c#

The only question I could find on SO was from 3 years ago and is not working for me.
Context: I am creating a C# webservice that needs to retrieve all users from a company's directory. This particular method needs the name and email of each user so it can populate a few lists. I am using Microsoft Exchange Web Services Managed API 2.0 downloaded from: here.

You probably want to use the FindItems method with a paged search (so that you can limit the number of contacts returned in each message).
This topic has info about getting items (contacts are just items): http://msdn.microsoft.com/en-us/library/office/dn535506(v=exchg.150).aspx#bk_getewsma. You'll want to create a property set to retrieve the name and email address from the ContactSchema.
And this topic has info about doing a paged search: http://msdn.microsoft.com/en-us/library/office/dn592093(v=exchg.150).aspx.

Related

How to get the list of Azure DevOps organizations in C#?

I'm part of more than one organization in Azure DevOps. It's easy to navigate between organizations in Web interface. But I'm looking to get the list of my organization in C#.
I can't find anything related in these links and in Google:
https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-server-rest-5.0
https://github.com/microsoft/azure-devops-dotnet-samples
https://www.dotnetcurry.com/devops/1485/using-rest-api-azure-devops
You're looking for the accounts API.
GET https://app.vssps.visualstudio.com/_apis/accounts?api-version=5.1
Create PAT:
Get member ID: https://learn.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user%20entitlements/get%20user%20entitlements?view=azure-devops-rest-5.1
Copy Id of a user from result and call REST API to get organizations:

How to get specific property of gmail emails when requesting a list?

I work with Gmail API, I found how to get a list of message ids and, in a loop, how to get specific properties of those emails separately.
Problem is to make request for each email is very slow, mainly when my client have hundreds of mails ordered in hundreds labels...
I've tried to find a method to get one specific property at the first request, when I use UsersResource.MessagesResource.ListRequest, but unsuccessfully...
For information, the property I want to get is "Message-ID" (not the id given by Google).
I did it once with Exchange Web Service, that why I'm looking to do it with Gmail API, if possible.
Thanks for answers in advance.
PS: Excuse my English, which is not my native language.
When you make your request to the API you can send an optional parameter called fields it will allow you to return a partial response and just the fields that you are intrested in
Documentation
https://www.googleapis.com/demo/v1?key=YOUR-API-KEY&fields=kind,items(title,characteristics/length)

Unable to get the room list from online exchange using EWS Managed API?

My client has created rooms on online exchange. I can see list of rooms at outlook.office365.com
I am following this url (http://msdn.microsoft.com/EN-US/library/office/dn643730(v=exchg.150).aspx) to get the room list from exchange online, but empty list is being returned.
What am i doing wrong? Can anybody help me out?
Unfortunately the GetRooms and GetRoomLists methods, which at a glance appear to be exactly what you are looking for, actually require that one or more "Room Lists" be created on the Exchange server, with one or more existing rooms added to the relevant "Room Lists". Only once this is done will the methods you refer to actually produce any results.
Unfortunately all my research into this topic has (so far) found that the ONLY way anyone can create a room list is via a PowerShell command on the exchange server. It can't be configured through Office 365 settings or through any hosted exchange provider's interface (such as hosted exchange made available via Parallels systems).
If you do have powershell access, try something like this:
http://technet.microsoft.com/en-us/library/ee633471%28v=exchg.141%29.aspx
They way I did was to name all conference rooms with the prefix Conf. For example, ConfAAA1, ConfBBB2, ConfCCC3, etc. Then to retrieve a list of all rooms:
List<NameResolution> result = ExchangeService.ResolveName("Conf",
ResolveNameSearchLocation.ContactsThenDirectory, true).ToList<NameResolution>();

eBay API: How do I specify "Standard Shipping (FedEx Ground or FedEx Home Delivery®)" as a shipping service?

I am wondering how I specify "Standard Shipping (FedEx Ground or FedEx Home Delivery®)" as a shipping service using the eBay API. Can anyone provide any pointers? All of the samples just use the "Standard Shipping" option.
You need to specify FedExHomeDelivery. A table of shipping services for most eBay sites can be found here. Simply use the values in the ID for importing column for your eBay API calls.
As the types of shipping services change over time you may wish to periodically retrieve the latest services via the API as follows.
For each eBay site that you are interested in make a call to GeteBayDetails with a DetailName value of ShippingServiceDetails.
In the results iterate over all the ShippingServiceDetails elements. Each one is a shipping service for the site that you specified.
Important properties for each service that you will need to check are,
ValidForSellingFlow - If this set to 'true' the service can be used in the Add/Revise/Relist API calls otherwise you can not use it.
Description - You can use this value when presenting services to a user. The text should match what users see when listing via eBay.
ShippingService - This is the value that you want to use in your API calls.
You can find all available shipping methods in the documentation of ShippingServiceCodeType.
Beware to use the correct ones of the site id where item will be placed.

Get Global Address List (GAL) from Exchange Server 2010 SP1 using ExchangeService

I want to programatically (using C#) access to the Global Address List on exchange, using ExchangeService WebService. How can I do that?
Another problem: I already know how to search for a specific user. However, if that user has more than 1 email, if i search for the non-default email, he can't find it! How can I resolve this question using ExchangeService?
I saw the question How to get contact list from Exchange Server? but, by this way, I only can access my own address list (i want all organization address list).
Does this do what you need?
http://vivekiyer.net/2010/07/17/querying-the-global-address-list-gal-via-exchange-web-services-ews/

Categories

Resources