I need to be able to access message tracking from Exchange 2010. I would prefer to do this with some sort of api but from the research that I've done I can seem to find anything that hints to the possibility to do this through EWS. The end goal is to count the number of emails sent by account and store the numbers into a seperate business application.
Edit: After looking at the EWS wsdl it looks like there is a FindMessageTrackingReport and GetMessageTrackingReport call. These are not found in EWS Managed API. I'm not sure this is what I'm looking for but I won't know until I get the results back from the API. Is there a way that I can still call this with just a normal web service? Any examples?
Something to the effect of this should work. I didn't have the time to import the proper namespaces, so it may not be perfect.
string querystring = "From:username#example.com Kind:email";
ItemView iv = new ItemView(1000);
FindItemsResults<Item> foundItems = _service.FindItems(WellKnownFolderName.SentItems, querystring, iv);
int count = foundItems.count();
I was able to finally find a solution. It wasn't through EWS but rather a combination of C#, Powershell, and Exchange Management Shell. Here is a link to the EWS Message Tracking Report solution
Related
I need to get the parameter values of Get-ThrottlingPolicy for Exchange 2013. I am looking at getting the values.
Is it possible to get this through EWS API?
I have tried extracting this through powershell from C#. I am not able to find the cmdlet Get-ThrottlingPolicy. What is the solution, what could be wrong. I am new to powershell.
Also can we retrieve the current status - ex current concurrency.
Sadly doesn't look like is possible. The github repo does not appear to contain any reference to throttling.
https://github.com/OfficeDev/ews-managed-api/search?q=throttling
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>();
I'm working on custom UI for company's directory based on Lync. Using Lync 2013 I execute this search:
Container.Instance.Lync.ContactManager.BeginSearch(SearchQuery,
SearchProviders.GlobalAddressList,
SearchFields.AllFields,
SearchOptions.IncludeContactsWithoutSipOrTelUri,
500,
ContactsAndGroupsCallback, SearchQuery);
For each of matching contacts I try to access their endpoints to display phone number:
var cit = ContactInformationType.ContactEndpoints;
var endpoints = contact.GetContactInformation(cit) as List<object>;
Problem
If found contact is in the contact list of account I'm using to connect Lync, then I get access to full details (5 endpoints). However if he is not in contact list, I get access to only 1 endpoint.
Any ideas why is it happening like that? Is there a global privacy setting I need to turn off or something?
How can I get access to all endpoints at all times?
Thank you.
PS: I tried to load each contact in the result set individually and still get the same behavior.
I encountered a similar problem when trying to write a program to obtain the status of all users on Lync SDK 2010. Chose all users and read it's status (online / offline etc.). But it's working out well with only those contacts that were in the list of client contacts. I do not know why, but the solutions are not found.A little later I use UCMA 4 (with Application endpoint), though the list received from AD and only able to get the current status.
Maybe it makes sense to use the search by AD? Find phone number by user sip? If so, try to use this filter for DirectorySearcher:
searcher.Filter = "(&(objectClass=user)(msRTCSIP-PrimaryUserAddress=*))"; //put sip instead of *
P.S. what sdk are you using?
Answer from Microsoft Support:
The behavior you are seeing is due to presence subscription optimization to the Lync client so that the subscription is delayed until the necessary contact information is required by the Lync client. Photo is an example for this optimization. Another example is ContactEndpoints. Please take a look at Contact presence subscription changes section of the Migration doc for Lync 2013 page in MSDN docs.
Specifically you must create and maintain your own ContactSubscription for the contacts that you need all the ContactEndpoints.
I have been facing the same issue. You can try loading the person's ContactCard before calling the GetContactInformation function explicitly
Microsoft.Lync.Controls.ContactCard objContactCard = new Microsoft.Lync.Controls.ContactCard();
objContactCard.Source=objContact.GetContactInformation(ContactInformationType.EmailAddresses);
ContactSubscription _contactSubscription = lyncObj.ContactManager.CreateSubscription();
_contactSubscription.AddContact(foundContact);
_contactSubscription.Subscribe(ContactSubscriptionRefreshRate.High, _ContactInformationList);
However, you still might get some delay in getting the information (phone numbers). You can choose to use Thread.Sleep or might just want to retry.
Hope this helps.
Problematic is relying on contact information even for the lync client user. In our solution we are doing something like this:
Contact user = LyncClient.GetClient().Self.Contact;
string email = user.GetContactInformation(ContactInformationType.PrimaryEmailAddress) as string;
I would expect that the current lync user contact always is filled properly. And if it wasn't, I'd expect the code to throw an exception or at least return null or an empty string.
Instead it sometimes returns the sip-uri of the contact without the leading "sip:" prefix. Oddly enough this is not always reproducable: Most of the time the code above returns the primary email address (according to active directory) correctly, sometimes it behaves as mentioned above.
We have a web application that links to an exchange account and shows a list of all emails relating to that specific customer. When you click on an email in the list then that specific email opens in a new window in OWA.
We have just been upgraded to Exchange 2010 and I was pleased to find that all this code needed to be rewritten as WebDav has been deprecated! I've got everything working so far except opening the email. This is an example of the URL I get when opening one manually:
https://owa.example.com/owa/?ae=Item&a=Open&t=IPM.Note&id=RgAAAADmf6EZfqbORr1%2fiveFFYyBBwDf6W1FdO8tR59JIuH4tblWAAABcKsWAAAT7QzqtNGiR6C1Ogbnj0IjAAAAA050AAAA&pspid=_1328545178425_761458089
The problem is that I don't know how to get the last parameter (pspid). Does anyone know what this is? I'm starting to think it might be a security token for the session as opposed to part of the email. Does anyone know know the best way to generate a link like this?
Thanks
It took about a day to find the answer so I hope this helps someone. I needed to convert to the OwaId.
//Get the OWA Id
public String GetOutlookOwaId(EmailMessage message, ExchangeService ser)
{
AlternateId ewsId = new AlternateId(IdFormat.EwsId, message.Id.ToString(), "person#example.com");
AlternateIdBase owaId = ser.ConvertId(ewsId, IdFormat.OwaId);
return ((AlternateId)owaId).UniqueId;
}
I'm using Google's .NET Client Library to read email on my gmail account.
But things are not very clear for me.
I'm trying to retrieve Atom feeds with this code.
FeedQuery query = new FeedQuery();
Service service = new Service("mail", "app-MailChecker-1");
service.setUserCredentials(Username, Password);
query.Uri = new Uri("https://mail.google.com/mail/feed/atom");
AtomFeed feed = service.Query(query);
It gives me a simple exception: can't retrieve feed.
My priority is to accomplish this using Google's .NET Client Library
but other options will be helpful as well.
Additional information: this method works for Google Calendar without a problem.
If you read Google's FAQ about the Google Data Protocol you'll see that it has no data API for GMail.
http://code.google.com/intl/nl-NL/apis/gdata/faq.html#GmailAtomFeed
To quote:
Does Gmail have a Data API?
No, but you can use Gmail's Atom feed with AuthSub or OAuth to request
read-only access to a user's unread messages. The scope should be set
to https://mail.google.com/mail/feed/atom/. An example query would be:
GET https://mail.google.com/mail/feed/atom/
If you're interested in managing your mail, Gmail also has IMAP/POP
support.
I experimented with version 1.9.0.0 of the Google Data .NET Client Library myself. Don't see any references to GMail.
Here's one possible approach on how to retrieve the unread messages:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=292
It's similar to what Christian suggested in his comment.