none
Getting a Meeting Room's description RRS feed

  • Question

  • I'm using Exchange 2010's EWS and I'm trying to read the description of a meeting room.

    We store the size and equipment information in its description and I want to read that back. I'm using GetUserAvailability to determine if a room is free, but I cannot figure out what call to make to return the other information.

    Can anyone please point me in the right direction?

    Thanks!

    Tuesday, August 7, 2012 8:01 AM

Answers

  •  AFAIK Exchange doesn't use the AD Description property at all for anything so nothing in EWS will return that for you so the only way would be to use LDAP and read it from Active Directory directly.

    If you can use one of the other properties within Active Directory instead that Exchange does use eg the Notes property then you could use ResolveNames to get the Contact information which will return all the Exchange/Ad properties eg

                NameResolutionCollection ncCol = service.ResolveName("user@domain.com",ResolveNameSearchLocation.DirectoryOnly,true);
                foreach (NameResolution nc in ncCol) {
                    Console.Write(nc.Contact.Notes);
                }

    Another option on 2010 would be to create a Custom MailTip to hold that information then you could retrive the information via MailTips eg

    set the MailTip for the account using

     set-mailbox meetingRoom2 -MailTip "Projector,Expresso Machine"

    The use MailTips in EWS to get this MailTip

                GetMailTipsType gmType = new GetMailTipsType();
                gmType.MailTipsRequested = new MailTipTypes();
                gmType.MailTipsRequested = MailTipTypes.CustomMailTip;
                gmType.Recipients = new EmailAddressType[1];
                EmailAddressType rcip1 = new EmailAddressType();
                rcip1.EmailAddress = "mr5@domain.com";
                gmType.Recipients[0] = rcip1;
                EmailAddressType sendAs = new EmailAddressType();
                sendAs.EmailAddress = "mr5@domain.com";
                gmType.SendingAs = sendAs;
                
                GetMailTipsResponseMessageType gmResponse = esb.GetMailTips(gmType);
                if (gmResponse.ResponseClass == ResponseClassType.Success) {
                    foreach (MailTipsResponseMessageType mtResp in gmResponse.ResponseMessages) {
                        Console.WriteLine(mtResp.MailTips.RecipientAddress.EmailAddress);
                        Console.WriteLine(mtResp.MailTips.CustomMailTip);
                        
                    }
    Cheers
    Glen
    Wednesday, August 8, 2012 5:14 AM

All replies

  •  AFAIK Exchange doesn't use the AD Description property at all for anything so nothing in EWS will return that for you so the only way would be to use LDAP and read it from Active Directory directly.

    If you can use one of the other properties within Active Directory instead that Exchange does use eg the Notes property then you could use ResolveNames to get the Contact information which will return all the Exchange/Ad properties eg

                NameResolutionCollection ncCol = service.ResolveName("user@domain.com",ResolveNameSearchLocation.DirectoryOnly,true);
                foreach (NameResolution nc in ncCol) {
                    Console.Write(nc.Contact.Notes);
                }

    Another option on 2010 would be to create a Custom MailTip to hold that information then you could retrive the information via MailTips eg

    set the MailTip for the account using

     set-mailbox meetingRoom2 -MailTip "Projector,Expresso Machine"

    The use MailTips in EWS to get this MailTip

                GetMailTipsType gmType = new GetMailTipsType();
                gmType.MailTipsRequested = new MailTipTypes();
                gmType.MailTipsRequested = MailTipTypes.CustomMailTip;
                gmType.Recipients = new EmailAddressType[1];
                EmailAddressType rcip1 = new EmailAddressType();
                rcip1.EmailAddress = "mr5@domain.com";
                gmType.Recipients[0] = rcip1;
                EmailAddressType sendAs = new EmailAddressType();
                sendAs.EmailAddress = "mr5@domain.com";
                gmType.SendingAs = sendAs;
                
                GetMailTipsResponseMessageType gmResponse = esb.GetMailTips(gmType);
                if (gmResponse.ResponseClass == ResponseClassType.Success) {
                    foreach (MailTipsResponseMessageType mtResp in gmResponse.ResponseMessages) {
                        Console.WriteLine(mtResp.MailTips.RecipientAddress.EmailAddress);
                        Console.WriteLine(mtResp.MailTips.CustomMailTip);
                        
                    }
    Cheers
    Glen
    Wednesday, August 8, 2012 5:14 AM
  • That's a pity, but I'll investigate the ActiveDirectory route. Thanks!
    Wednesday, August 8, 2012 7:20 AM