Quantcast
Channel: Exchange Server Development forum
Viewing all 7132 articles
Browse latest View live

Async Certificate Issue

$
0
0

Hi,

I have recently added an Exchange 2016 server alongside my 2013 server and am in the process of moving across mailboxes etc.

We have several Noklia Lumia's set up to sync email with the 2013 server, which works perfectly. But if I try to use the 2016 server for the same the phones throw up a certificate error. The SSL certificate is the same on both servers and is purchased rather than internally created (so shouldn't be any issues with authentication, although I have tried adding the root certs to the phone just in case). If I connect to OWA through the internet on the phone it connects, without issue, to the 2016 server and there are no certificate errors.

Using Nokia Lumia 830, Windows Phone 8.1 Update 2

Hopefully someone out there has an idea of what else I can check.

Cheers


Convert EwsId to hexEntryId - ErrorInvalidIdMalformed (Exchange 2013/Public Folders)

$
0
0

Hello,

this code converts the ews id to the outlook EntryId:

Public Function ConvertEwsIDToHexEntryID(id As String) As String

        Dim objAltID As New AlternateId()
        objAltID.Format = IdFormat.EwsId
        objAltID.Mailbox = "user@domain.de"
        objAltID.UniqueId = id

        Dim aidList As New List(Of AlternateIdBase)()
        aidList.Add(objAltID)

        Dim cidResponse As ServiceResponseCollection(Of ConvertIdResponse) = _ewsService.ConvertIds(aidList, IdFormat.HexEntryId)
        Dim aidResult As New AlternateId()
        aidResult.Format = IdFormat.HexEntryId
        aidResult = DirectCast(cidResponse.First().ConvertedId, AlternateId)
        Dim convertedEntryID As String = aidResult.UniqueId

        Return convertedEntryID

    End Function

But with a public folder error 161 'ErrorInvalidIdMalformed' occurs.

Any ideas?

Achim


Contact created using EWS does not have the birthday displayed in the calendar

$
0
0

Hello,

I wrote an application that synchronizes ERP data with user's mailboxes. It's also syncing contacts - and their respective birthdays. Yesterday we received a support request from a user who wants to see the birthdays in his exchange based calendar. It goes like this:

Manual scenario:

  • User starts his outlook
  • Creates a new contact and fills in it's birthday
  • Save
  • Now he checks his calendar and she could see the birthday reminder in there...

Automatic (our sync tool)

  • User creates a contact in ERP system, fills in it's birthday
  • Sync tool picks up the new contact and calls create contact (Contact.save using Microsof Exchange Webservices DLL)
  • Contact is created, but the birthday is not visible in the calendar

I found a few discussions about the outlook's contact import behaving this way:

https://social.technet.microsoft.com/Forums/office/en-US/600d7d7d-a8b5-426b-b5f3-78a6902b35db/birthdays-missing-from-calendar?forum=outlook

Does this mean that the EWS contact.save does not create some kind of calendar entry either?

If not, would I have to create the calendar appointment (for the birthday reminder) manually? Is that just a normal appointment or is there anything to be extra careful about?

Many thanks,

Martin


EWS URL from Office 365 discovery endpoints

$
0
0
We are using a mix of EWS SOAP API and Office 365 REST API to access user's calendar. We use discovery service to determine the Office 365 service endpoints (for Calendar, Mail etc.). Can we use the hostname from the Office 365 service endpoint URL to construct the URL for EWS ? For example, if the Calendar service URL returned by discovery is "https://mytenant.office365.com/api/v1.0" can we use "https://mytenant.office365.com/ews/exchange.asmx" as the EWS URL ?

Get all appointments from a resource(room) in Exchange Online(2010) with EWS

$
0
0

Hello technet,

Speccs: Visual Studio 2010, Exchange Online (2010), Using Exchange Web Service API and C#.

I need to display the next 2 meetings(appointments) from all my room-resources.

I can get all my own appointments when I bind the service to my personal exchangeprofile using EWS, but this is not possible for the rooms because they are resources.

Just to be clear, - I am looking for something that can return a list of all meetings(appointments) in a desired room(resource).

I really hope someone can help me!

Thanks in advance, Mads.


Getting all emails currently in inbox using EWS

$
0
0

I am writing an application to monitor a mailbox and log tickets for a support ticketting system.

I have it working (mostly) however I just noticed that when the monitor programme first starts up, anything already in the mailbox is ignored and not processed.

This is the code I am using to retrieve items from the mailbox, can anyone assist please? (this is called one when the application first launches, and then whenever the subscription is notified of incoming mail, so I thought it would process all current emails in there as well).

The email is then processed and moved by the receiving code (a website).

Thanks in advance!

       void CheckForItems()
        {
            // Track whether there are more items available for download on the server.
            bool moreChangesAvailable = false;

            do
            {
                // Get a list of all items in the Inbox by calling SyncFolderHierarchy repeatedly until no more changes are available.
                // The folderId parameter must be set to the root folder to synchronize,
                // and must be same folder ID as used in previous synchronization calls.
                // The propertySet parameter is set to IdOnly to reduce calls to the Exchange database,
                // because any additional properties result in additional calls to the Exchange database.
                // The ignoredItemIds parameter is set to null, so that no items are ignored.
                // The maxChangesReturned parameter is set to return a maximum of 10 items (512 is the maximum).
                // The syncScope parameter is set to Normal items, so that associated items will not be returned.
                // The syncState parameter is set to cSyncState, which should be null in the initial call,
                // and should be set to the sync state returned by the
                // previous SyncFolderItems call in subsequent calls.
                ChangeCollection<ItemChange> icc = service.SyncFolderItems(new FolderId(WellKnownFolderName.Inbox), PropertySet.IdOnly, null, 10, SyncFolderItemsScope.NormalItems,"");

                // If the count of changes is zero, there are no changes to synchronize.
                if (icc.Count == 0)
                {

                }
                else
                {
                    foreach (ItemChange ic in icc)
                    {
                        PropertySet propSet = new PropertySet(BasePropertySet.FirstClassProperties);
                        Item item = Item.Bind(this.service, ic.ItemId, propSet);

                        //-------------------------------------------------
                        //SEND ALERT HERE
                        //-------------------------------------------------
                        
                        if(this.OnNotifyEmail != null)
                            this.OnNotifyEmail(item);

                        WebRequest webRequest = WebRequest.Create(string.Format(this.ticketUrlHandler, System.Net.WebUtility.UrlEncode(item.Id.UniqueId)));
                        HttpWebResponse response = null;

                        webRequest.Timeout = 1200; //miliseconds
                        webRequest.Method = "HEAD";
                        webRequest.UseDefaultCredentials = true;

                        try
                        {
                            response = (HttpWebResponse)webRequest.GetResponse();
                        }
                        catch (WebException webException)
                        {
                            WebExceptionStatus status = webException.Status;
                            this.OnEmailError(item, webException.Message);
                        }
                        catch (Exception ex)
                        {
                            this.OnEmailError(item, ex.Message);
                        }
                        finally
                        {
                            if (response != null)
                            {
                                response.Close();
                            }
                        }

                    }
                }

                // Save the sync state for use in future SyncFolderContent requests.
                // The sync state is used by the server to determine what changes to report
                // to the client.
                string sSyncState = icc.SyncState;

                // Determine whether more changes are available on the server.
                moreChangesAvailable = icc.MoreChangesAvailable;
            }

            while (moreChangesAvailable);
        }


port 25 blocked for developer machines!

$
0
0

We are asp.net developers, work in a company.

Development achieved in our development devices/laptops where VS installed.

After development, test operations finished, we publish application into servers.

Our applications need to send emails, so we do that via exchange server through port 25.

Suddenly, during development and test stage, we noticed that we cannot send emails. We contacted exchange server administrator. He told us that he blocked port 25 for our development devices/laptops because Microsoft recommends that.

We asked him how we can achieve development, test operations? He said that you can do that from server! Note that server is for just publishing; it does not have any IDE for developing or test!

Is this true?

Is this practical?

Does Microsoft recommend this strange situation?



Remove inline attachment from email body

$
0
0

Hi,

I get EmailMessage from Exchange server by calling EmailMessage.Bind() API.

I then want to remove Inline attachment from body of the email and convert it into a regular/not inline file attachment.

Is there a way to do this?

Thank you.


Isolda


[C#][EWS-managed-API 2.2][WPF][Exchange Server 2013] synchronize GAL to Application

$
0
0

Hello i try to create a application that synchronize and shows every contact in the GAL to an User-Interface so i can pase it to my custom contacts class. Somehow it wont work. For my Local Adress List it works but when it comes from an GAL it wont work. So when there is any way around i didnt found it.

What i tried so far: (For the local contacts (works))

 private void AsignValuetoClass(object sender, RoutedEventArgs e)
        {

            //For the connection
            es.UseDefaultCredentials = true;
            es.AutodiscoverUrl("max.mustermann@muster.at", RedirectionUrlValidationCallback);

            //How many Contacts are in the folder
            ContactsFolder contactsfolder = ContactsFolder.Bind(es, WellKnownFolderName.Contacts);



            //To get a specific number of contacts
            int numItems = contactsfolder.TotalCount < 50 ? contactsfolder.TotalCount : 50;

            //object of the Itemview
            ItemView view = new ItemView(numItems);

            //return the stuff
            FindItemsResults<Item> contactIds = es.FindItems(WellKnownFolderName.Contacts, view);




            //loop throug the item
            foreach (Item item in contactIds)
            {

                if (item is Contact)
                {
                    //assign of the contact items
                    Contact contact = item as Contact;

                    //new list
                    List<Contact> testlist = new List<Contact>();
                    //Add the contacts
                    testlist.Add(contact);

                    //loop through contact list
                    foreach (Contact Liste in testlist)
                    {
                        //new object on every run
                        TestKlasse test = new TestKlasse();

                        //assign
                        test.id = Convert.ToString(contact.Id);
                        test.Vorname = contact.GivenName;
                        test.Nachname = contact.Surname;
                    }

                    Console.WriteLine("Some stupid Text");

                }
            }
        }

The for the GAL: (dont work)

       private void SearchContacts(object sender, EventArgs e)
        {

            //For the connection
            es.UseDefaultCredentials = true;
            es.AutodiscoverUrl("max.mustermann@muster.at", RedirectionUrlValidationCallback);


            // Identify the mailbox folders to search for potential name resolution matches.
            List<FolderId> folders = new List<FolderId>() { new FolderId(WellKnownFolderName.Contacts) };

            // Search for all contact entries in the default mailbox contacts folder and in Active Directory Domain Services (AD DS). This results in a call to EWS.
            NameResolutionCollection coll = es.ResolveName("WEB Kontakte Gesamt", folders, ResolveNameSearchLocation.DirectoryOnly, false);
            NameResolutionCollection colle = es.ResolveName("B", folders, ResolveNameSearchLocation.DirectoryOnly, false);
            NameResolutionCollection collec = es.ResolveName("C", folders, ResolveNameSearchLocation.DirectoryOnly, false);


            foreach (NameResolution nameRes in coll)
            {
                Console.WriteLine("Contact name: " + nameRes.Mailbox.Name);
                Console.WriteLine("Contact e-mail address: " + nameRes.Mailbox.Address);
                Console.WriteLine("Mailbox type: " + nameRes.Mailbox.MailboxType);
            }

            foreach (NameResolution nameRes in colle)
            {
                Console.WriteLine("Contact name: " + nameRes.Mailbox.Name);
                Console.WriteLine("Contact e-mail address: " + nameRes.Mailbox.Address);
                Console.WriteLine("Mailbox type: " + nameRes.Mailbox.MailboxType);
            }

            foreach (NameResolution nameRes in collec)
            {
                Console.WriteLine("Contact name: " + nameRes.Mailbox.Name);
                Console.WriteLine("Contact e-mail address: " + nameRes.Mailbox.Address);
                Console.WriteLine("Mailbox type: " + nameRes.Mailbox.MailboxType);
            }



        }
And many hours of google but no success. So any help would be great. Thx for your time and sorry for my bad english.

How many LDAP query throws/ executes/ runs during Exchange server installation?

$
0
0

Hi All,

I would like to know that, how many LDAP query thorws during exchange server installation? Kindly consider standalone (DC+ All Exchange server roles on one machine) env and in DAG env (DC+ CAS+MBX1+MBX2)?

Thanks,

Sudhir





Exchange Server 2010 with cdo and authentication

$
0
0

I am trying to setup my Exchange Server so that I can send emails to users outside to the organization using cdo and I can't seem to find the correct settings.

I do not want to allow anonymous relay or have it limited by the IP address of the sender.

I am actually specifying the user name and password in the cdo call.  It was my understanding that this was allowed by enabling "Basic Authentication" on the receive connector.  For security, offer basic only after TLS is also enabled to prevent sending the username and password across the network and possibly the internet (depending on where the server is) in clear text form.

The following is a vbs script I was using to test this:

'Values to specify are stored in the email setup for Event Alert - please manually add them to this script
    cdoSendUsingMethod       = "http://schemas.microsoft.com/cdo/configuration/sendusing"
    cdoSMTPServer            = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
    cdoSMTPServerPort        = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
    cdoSMTPConnectionTimeout = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
    cdoSMTPAuthenticate      = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
    cdoSendUserName          = "http://schemas.microsoft.com/cdo/configuration/sendusername"
    cdoSendPassword          = "http://schemas.microsoft.com/cdo/configuration/sendpassword"
    cdoSMTPUseSSL            = "http://schemas.microsoft.com/cdo/configuration/smtpusessl"
    cdoSendEmailAddress      = "http://schemas.microsoft.com/cdo/configuration/sendemailaddress"

    Set objMessage = CreateObject("CDO.Message")

    With objMessage
        With .Configuration.Fields  'Set config fields we care about
            .Item(cdoSendUsingMethod)       = 2        ' = cdoSendUsingPort
            .Item(cdoSMTPServer)            = "exchange.client.local"          'Specify actual SMTP Server name or IP here

            .Item(cdoSMTPServerPort)        = 25
            .Item(cdoSMTPConnectionTimeout) = 60
            .Item(cdoSMTPAuthenticate)      = 1                                ' = cdoBasic
            .Item(cdoSendUserName)          = "ClientDomain\testaccount"       'Specify Actual user name here
            .Item(cdoSendPassword)          = "password"                       'Specify Actual password here
            .Item(cdoSMTPUseSSL)            = True                             'Using SSL/TLS? Specify True or False
            .Item(cdoSendEmailAddress)      = "testaccount@clientdomain.com"   'Specify email address here in the form "Display Name <email_address>"  (same as .From of objMessage)

            .Update
        End With

        .To       = Seradex@hotmail.com                                        'Specify Destination email here - form: "Display Name <email_address>"
        .From     = "TestAccount <testaccount@clientdomain.com>"               'Specify Source email here - form: "Display Name <email_address>"
        .Subject  = "Test email"
        .TextBody = "This is to test sending an email"
        '.HTMLBody = "This is to test sending an email"                        'To test HTMLBody add html formatted body - should not be required for basic test.
        .Send
    End With

I appreciate all help in this matter.  Thank you.

Mark

Seradex Inc.

EWS: How to get attachment(s) full info for a CalendarItem?

$
0
0

I'm getting a CalendarItem with attachments using such SOAP request against Office 365:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><soap:Header><t:RequestServerVersion Version="Exchange2007_SP1"/></soap:Header><soap:Body><GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><ItemShape><t:BaseShape>AllProperties</t:BaseShape><t:AdditionalProperties><t:FieldURI FieldURI="item:Attachments" /></t:AdditionalProperties></ItemShape><ItemIds><t:ItemId Id="..." ChangeKey="..."/></ItemIds></GetItem></soap:Body></soap:Envelope>

And I get a list of attachments with limited info in the response message:

<t:Attachments><t:FileAttachment><t:AttachmentId Id="..."/><t:Name>20140110_055901_NR.MP4</t:Name></t:FileAttachment><t:ItemAttachment><t:AttachmentId Id="..."/><t:Name>hidden discussion topic</t:Name></t:ItemAttachment></t:Attachments>

But where are ContentType and ContentId properties under the ItemAttachment?? You normally get them when you get an Email item with list of attachments, e.g.:

<t:FileAttachment><t:AttachmentId Id="..."/><t:Name>test.txt</t:Name><t:ContentType>text/plain</t:ContentType><t:ContentId>45798FE9C0BFEC40BD46E31E03DEE9AF@namprd05.prod.outlook.com</t:ContentId></t:FileAttachment>

The CalendarItem HTML body can contain inline references to attachments:

<a href="cid:D44D196860052BCAF2ED99715B47485F516D1531@1">20140110_055901_NR.MP4</a>

But I don't see any way to find out the ContentId for an attachment in a CalendarItem.

Is there any known workaround?

-----------------------------

UPDATE

If you get MIME of the CalendarItem, you can fetch ContentId from ATTACH header(s), e.g.:

ATTACH:CID:D44D196860052BCAF2ED99715B47485F516D1531@namprd05.prod.outlook.com

And I assume that "@1" in the HTML href is the alias for "@namprd05.prod.outlook.com".

But is the order of attachments in MIME and SOAP response the same?

Any other foolproof solutions?


EWS API Question

$
0
0

Hi, I am developing a custom web app and I randomly get this failure message on objects that are not corrupted/malformed and are OK when trying to retrieve certain items through the  EWS API:

2016-01-18 20:18:26 [569d2ac8e4b058344a8ee745] ERROR ExchangeIterator Basic property loading failed for single item AAMkAGQ0NTg0YTZhLTBhNWYtNGJkMS05YzMzLTI4ZDU1ZjBhMmU3OQBGAAAAAAASvqbh6YZrQZUUkcDadb9tBwB0Ofa9MJ7MTZ4CFqASic7YAAAAAAENAAB0Ofa9MJ7MTZ4CFqASic7YAAFxRHXpAAA=. Item will be ignored. Microsoft.Exchange.WebServices.Data.ServiceResponseException: The specified object was not found in the store., Microsoft.Exchange.Data.Storage.ObjectNotFoundException: The process failed to get the correct properties. ---> Microsoft.Mapi.MapiExceptionNotFound: MapiExceptionNotFound: Unable to get properties on object. (hr=0x8004010f, ec=-2147221233) Diagnostic context: Lid: 55847 EMSMDBPOOL.EcPoolSessionDoRpc called [length=733] Lid: 43559 EMSMDBPOOL.EcPoolSessionDoRpc returned [ec=0x0][length=238][latency=0] Lid: 52176 ClientVersion: 15.1.365.23 Lid: 50032 ServerVersion: 15.1.365.6023 Lid: 35180 Lid: 23226 --- ROP Parse Start --- Lid: 27962 ROP: ropOpenMessage [3] Lid: 17082 ROP Error: 0x8004010F Lid: 26977 Lid: 21921 StoreEc: 0x8004010F Lid: 27962 ROP: ropExtendedError [250] Lid: 1494 ---- Remote Context Beg ---- Lid: 50428 Lid: 59416 StoreEc: 0x8004010F Lid: 38536 Lid: 10786 dwParam: 0x0 Msg: 15.01.0365.023:CY1PR0601MB1486 Lid: 1750 ---- Remote Context End ---- Lid: 27962 ROP: ropGetPropsSpecific [7] Lid: 17082 ROP Error: 0x4B9 Lid: 26465 Lid: 21921 StoreEc: 0x4B9 Lid: 31418 --- ROP Parse Done --- Lid: 22753 Lid: 21817 ROP Failure: 0x4B9 Lid: 20385 Lid: 28577 StoreEc: 0x8004010F Lid: 32001 Lid: 29953 StoreEc: 0x8004010F Lid: 32768 Lid: 33024 StoreEc: 0x8004010F at Microsoft.Mapi.MapiExceptionHelper.InternalThrowIfErrorOrWarning(String message, Int32 hresult, Boolean allowWarnings, Int32 ec, DiagnosticContext diagCtx, Exception innerException) at Microsoft.Mapi.MapiExceptionHelper.ThrowIfError(String message, Int32 hresult, IExInterface iUnknown, Exception innerException) at Microsoft.Mapi.MapiProp.GetProps(ICollection`1 propTagsRequested) at Microsoft.Exchange.Data.Storage.MapiPropertyBag.GetProperties(IList`1 propertyDefinitions) --- End of inner exception stack trace --- at Microsoft.Exchange.Data.Storage.MapiPropertyBag.GetProperties(IList`1 propertyDefinitions) at Microsoft.Exchange.Data.Storage.StoreObjectPropertyBag.InternalLoad(ICollection`1 extraProperties) at Microsoft.Exchange.Data.Storage.StoreObjectPropertyBag..ctor(StoreSession session, MapiProp mapiProp, ICollection`1 autoloadProperties, Boolean canSaveOrDisposeMapiProp) at Microsoft.Exchange.Data.Storage.ItemBuilder.CoreItemBind(StoreSession session, StoreId storeId, MapiMessageCreator mapiMessageCreator, ItemBindOption itemBindOption, ICollection`1 propertiesToLoad, StoreObjectType& storeObjectType) at Microsoft.Exchange.Data.Storage.ItemBuilder.ItemBind[T](StoreSession session, StoreId storeId, Schema expectedSchema, MapiMessageCreator mapiMessageCreator, ItemBindOption itemBindOption, ICollection`1 propertiesToLoad, ItemCreateInfo itemCreateInfo) at Microsoft.Exchange.Data.Storage.Item.Bind(StoreSession session, StoreId storeId, ItemBindOption itemBindOption, ICollection`1 propsToReturn) at Microsoft.Exchange.Data.Storage.Item.BindWithFallbackSearch(StoreSession session, StoreId storeId, String internetMessageId, ICollection`1 propsToReturn, Boolean& didFallbackSearch) at Microsoft.Exchange.Services.Core.ServiceCommandBase.GetXsoItem(StoreSession session, StoreId id, String internetMessageId, PropertyDefinition[] properties) at Microsoft.Exchange.Services.Core.Types.IdConverter.CorrectIdForObjectType(StoreSession session, StoreObjectId objectId, StoreObjectType deserializedObjectType, Boolean isIdConversionNeeded, String internetMessageId, Item& cachedItem) at Microsoft.Exchange.Services.Core.Types.IdConverter.CreateStoreObjectId(StoreSession session, Byte[] storeObjectIdBytes, String internetMessageId, StoreObjectType objectType, IdProcessingInstruction idProcessingInstruction, BasicTypes expectedType, ConvertOption convertOption, Boolean isIdConversionNeeded, Item& cachedItem) at Microsoft.Exchange.Services.Core.Types.IdConverter.CreateAppropriateStoreIdType(StoreSession session, IdHeaderInformation idHeaderInformation, String changeKey, ConvertOption convertOption, BasicTypes expectedType, Boolean isIdConversionNeeded, Item& cachedItem) at Microsoft.Exchange.Services.Core.Types.IdConverter.ConvertId(IdConverterDependencies dependencies, IdHeaderInformation headerInformation, ConvertOption convertOption, BasicTypes expectedType, List`1 attachmentIds, String changeKey, Int32 hashCode, Boolean unifiedLogon, Item& cachedItem) at Microsoft.Exchange.Services.Core.Types.IdConverter.ConvertItemIdToIdAndSession(BaseItemId baseItemId, ConvertOption convertOption, BasicTypes expectedType, Item& cachedItem) at Microsoft.Exchange.Services.Core.Types.IdConverter.ConvertItemIdToIdAndSessionReadOnly(BaseItemId singleId, BasicTypes expectedType, Boolean deferBind, Item& cachedItem) at Microsoft.Exchange.Services.Core.GetItem.<>c__DisplayClass1.<Execute>b__0() at Microsoft.Exchange.Common.IL.ILUtil.DoTryFilterCatch(Action tryDelegate, Func`2 filterDelegate, Action`1 catchDelegate) at Microsoft.Exchange.Services.Core.GetItem.Execute() at Microsoft.Exchange.Services.Core.ExceptionHandler`1.Execute(CreateServiceResult createServiceResult, Int32 index, GenerateMessageXmlForServiceError generateErrorXml) at Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary() at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalBindToItems(IEnumerable`1 itemIds, PropertySet propertySet, ServiceErrorHandling errorHandling) at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem[TItem](ItemId itemId, PropertySet propertySet) at FooBar.Office365.API.Core.Exchange.ExchangeIterator.<>c__DisplayClass6_1.<LoadSingleItem>b__1() at FooBar.Office365.Framework.Utilities.Retry.Do(Func`1 f, Int32 maxRetries, Int32 delay) at FooBar.Office365.API.Core.Exchange.ExchangeIterator.LoadSingleItem(ExchangeService exchangeService, PropertySet detailsPropset, String itemId) --------

Here is the question I posted on stackoverflow(wouldnt let me post a hyperlink):

When I run the following code:

item = Item.Bind(exchangeService, new ItemId(itemId), p);

I get this exception:

Microsoft.Exchange.WebServices.Data.ServiceResponseException: The specified object was not found in the store., Microsoft.Exchange.Data.Storage.ObjectNotFoundException: The process failed to get the correct properties. ---> Microsoft.Mapi.MapiExceptionNotFound: MapiExceptionNotFound: Unable to get properties on object. (hr=0x8004010f, ec=-2147221233)

and/or

Microsoft.Exchange.WebServices.Data.ServiceResponseException: The specified object was not found in the store., Microsoft.Exchange.Data.Storage.ObjectNotFoundException: Cannot get ID from name. ---> Microsoft.Mapi.MapiExceptionNotFound: MapiExceptionNotFound: Unable to get IDs from property names. (hr=0x8004010f, ec=-2147221233)

I have seen other people ask the same question on other forums lately, but without answers.

I was curious if anyone may have any insight on what could be causing this?

Possibly an object has been moved(moved to another folder/deleted) during the processing of it?

Or could it be possibly be related to a permission issue regarding inheritance when retrieving the object?

I don't know where else to post this as the Azure guys were not helpful in any sense and I can't find a forum in regards to Office 365 and/or EWS API. Last post link: https://social.msdn.microsoft.com/Forums/en-US/fbba2b02-f69c-48b5-8637-f8ca4f621ccc/ews-api-question?forum=azureapimgmt&prof=required

When user account lockout occurs for "Log on to" and "ActiveSync" ?

$
0
0

Hi all,

I was wondering when about the account lockout status for the following situations:

1- User configured with "Log on to" specific computer. // does it happens when someone try to log by his username into another PC or it just happens when it is used on that specific computer?

2- User with disabled activesync feature in exchage 2010. // does it happens when someone try to use his user name into mobile device "With the right server and domain details" or it doesn't happen at all?

3- User with enabled activesync feature in exchange 2010. //Does removing mobile partnership from the mail account can stop the user account from being locked by lost, stolen or unknown device?

Thanks ..

Exchange Calendar: For an event fetched using Using EWS GetItem API how do I determine if I am the organiser of this event?

$
0
0
I am building a client for Exchange Calendar Service using EWS API (using EWS XML and not EWS Managed API).
When I query the GetItem API, from the response, how do I determine if I am the organizer of this event?
I tried the following but could not conclude anything.

1. IsOrganizer is available only after Exchange Server 2013. 
2. MyResponseType some time is 'Organizer' and some times it is 'Unknown'. Could not figure our when will it be 'Organizer' and when will it be 'Unknown'. The documentation does not say much.

Please help.




EWS error is returned for only one Mailbox server 'namprd07.prod.outlook.com'

$
0
0

Hi,

I am developing client application which connects to Outlook 365 using EWS.

Sometimes I get an error : "The specified object was not found in the store." for the request "GetFolder" for the well known folder 'contacts'. Error is rare. Most time I receive normal response.

Example of Request / Response with the error:

---------------------------------------------------

<Trace Tag="EwsRequestHttpHeaders" Tid="6" Time="2016-02-23 14:58:04Z">
POST /EWS/Exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.0847.030
Accept-Encoding: gzip,deflate


</Trace>
<Trace Tag="EwsRequest" Tid="6" Time="2016-02-23 14:58:04Z" Version="15.00.0847.030">
  <?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
      <t:RequestServerVersion Version="Exchange2010_SP2" />
    </soap:Header>
    <soap:Body>
      <m:GetFolder>
        <m:FolderShape>
          <t:BaseShape>IdOnly</t:BaseShape>
          <t:AdditionalProperties>
            <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="StorageSchema" PropertyType="String" />
          </t:AdditionalProperties>
        </m:FolderShape>
        <m:FolderIds>
          <t:DistinguishedFolderId Id="contacts" />
        </m:FolderIds>
      </m:GetFolder>
    </soap:Body>
  </soap:Envelope>
</Trace>
<Trace Tag="EwsResponseHttpHeaders" Tid="6" Time="2016-02-23 14:58:05Z">
HTTP/1.1 500 Internal Server Error
request-id: f853d42b-06af-4f56-8983-c0633ad07705
X-CalculatedBETarget: BY1PR0701MB1782.namprd07.prod.outlook.com
X-BackEndHttpStatus: 500
X-DiagInfo: BY1PR0701MB1782
X-BEServer: BY1PR0701MB1782
Content-Length: 629
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Set-Cookie: exchangecookie=eaad85dc12f243c4a6ce8e8b69bb3528; expires=Thu, 23-Feb-2017 14:58:05 GMT; path=/; HttpOnly,X-RouteRefreshCookie=zoHNz87J0s/N0s3Mq87LxcrHxc/Kgb2zqq+tz8i8vs/JzYGqgbOWiZq2m7Kakp2ajbGekprFlYqMi5aR0YyQlJCT2svPlpKemJaRmoyQk4qLlpCRjNGckJLazL3Cu56Lnp2ejJq4ipabxcvPys2dnsnJ0p7LnpvSy8fHzdKemZvI0sbJyZvJncfNx8ybmdrLz5aSnpiWkZqMkJOKi5aQkYzRnJCS2svPkZ6Sj42bzsjRj42Qm9GQiouTkJCU0ZyQktrLz8+/zszOz8/IzszPx8rPzcfHyM3M; expires=Tue, 23-Feb-2016 15:13:05 GMT; path=/
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-FEServer: BLUPR07CA062
Date: Tue, 23 Feb 2016 14:58:04 GMT


</Trace>
<Trace Tag="EwsResponse" Tid="6" Time="2016-02-23 14:58:05Z" Version="15.00.0847.030">
  <?xml version="1.0" encoding="utf-8"?>
  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
      <s:Fault>
        <faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorItemNotFound</faultcode>
        <faultstring xml:lang="en-US">The specified object was not found in the store.</faultstring>
        <detail>
          <e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorItemNotFound</e:ResponseCode>
          <e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The specified object was not found in the store.</e:Message>
        </detail>
      </s:Fault>
    </s:Body>
  </s:Envelope>
</Trace>

---------------------------------------------------

Example of normal Request / Response:

---------------------------------------------------

<Trace Tag="EwsRequestHttpHeaders" Tid="41" Time="2016-02-23 15:23:15Z">
POST /EWS/Exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.0847.030
Accept-Encoding: gzip,deflate


</Trace>
<Trace Tag="EwsRequest" Tid="41" Time="2016-02-23 15:23:15Z" Version="15.00.0847.030">
  <?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
      <t:RequestServerVersion Version="Exchange2010_SP2" />
    </soap:Header>
    <soap:Body>
      <m:GetFolder>
        <m:FolderShape>
          <t:BaseShape>IdOnly</t:BaseShape>
          <t:AdditionalProperties>
            <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="StorageSchema" PropertyType="String" />
          </t:AdditionalProperties>
        </m:FolderShape>
        <m:FolderIds>
          <t:DistinguishedFolderId Id="contacts" />
        </m:FolderIds>
      </m:GetFolder>
    </soap:Body>
  </soap:Envelope>
</Trace>
<Trace Tag="EwsResponseHttpHeaders" Tid="41" Time="2016-02-23 15:23:15Z">
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Encoding: gzip
Vary: Accept-Encoding
request-id: bfa0469c-186a-4733-9ff2-22423a8b4c6f
X-CalculatedBETarget: BY2PR17MB0263.namprd17.prod.outlook.com
X-BackEndHttpStatus: 200
x-EwsHandler: GetFolder
X-DiagInfo: BY2PR17MB0263
X-BEServer: BY2PR17MB0263
X-FEServer: BN3PR16CA0080
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Date: Tue, 23 Feb 2016 15:23:15 GMT
Set-Cookie: exchangecookie=e965d11d1daf4747b7877929155262c4; expires=Thu, 23-Feb-2017 15:23:15 GMT; path=/; HttpOnly
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET


</Trace>
<Trace Tag="EwsResponse" Tid="41" Time="2016-02-23 15:23:15Z" Version="15.00.0847.030">
  <?xml version="1.0" encoding="utf-8"?>
  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
      <h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="409" MinorBuildNumber="24" Version="V2016_01_06" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
    </s:Header>
    <s:Body>
      <m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
        <m:ResponseMessages>
          <m:GetFolderResponseMessage ResponseClass="Success">
            <m:ResponseCode>NoError</m:ResponseCode>
            <m:Folders>
              <t:ContactsFolder>
                <t:FolderId Id="AAMkADgzOWIyM2Y1LTM5OGQtNDQ5Zi1hMGFjLTExMzVlMzNjYjQyMwAuAAAAAACPuqjbnQeXQLNyrRCrlJvDAQD1NCrh4nokQ6J4oUo+ROhLAAAAAAEOAAA=" ChangeKey="AwAAABYAAAD1NCrh4nokQ6J4oUo+ROhLAABkY1+w" />
                <t:ExtendedProperty>
                  <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="StorageSchema" PropertyType="String" />
                  <t:Value>2</t:Value>
                </t:ExtendedProperty>
              </t:ContactsFolder>
            </m:Folders>
          </m:GetFolderResponseMessage>
        </m:ResponseMessages>
      </m:GetFolderResponse>
    </s:Body>
  </s:Envelope>
</Trace>

---------------------------------------------------

It is the same Outlook 365 account.

I check all the logs. I have found that all the errors is related to the Mailbox server 'namprd07.prod.outlook.com'. What can be the reason of such strange behavior? Is there any work-around? 

Problem with SendOnlyToChanged

$
0
0

Hi

I tried to use EWS API 2.0 to remove an attendee from the exchange calendar meeting with option "SendOnlyToChanged". Removed attendee received an email with "cancel" the meeting but others attendees also received an email with update the meeting. I don't know why because I set SendOnlyToChanged option.

So every time when I removed attendee others received an meeting update.

My code:

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
service.Credentials = CredentialCache.DefaultNetworkCredentials;
service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress,email@email);
service.AutodiscoverUrl("email@email");

String sEntryID = _szkolenie_item["outlook_calendar_item_id"].ToString();
String sEWSID = GetConvertedEWSID(service, sEntryID, "email@email");

Appointment _spotkanie = Appointment.Bind(service, new ItemId(sEWSID));
                                            
for (int i = 0; i < _spotkanie.RequiredAttendees.Count; i++)
{
if (_spotkanie.RequiredAttendees[i].Address.ToLower().Equals(getSPUser(_site2, _zapisy_item["uczestnik"].ToString()).Email.ToLower()))
{
_spotkanie.RequiredAttendees.RemoveAt(i);
break;
}
}
_spotkanie.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToChanged);

 

 Anybody can explain why this happened and how to fix it ?


MNiemczycki

Private Web Outlook Add-In

$
0
0

Hi.

I recently started at this company and was given a task for automation. I developed a VSTO add-in for outlook that can be easily distributed throughout the company but what about the Web Email Interface. It gives the option of adding add-ins from the store but would it be possible to add the add-in I developed. Is this possible without putting it on the store? 

Thanks

How to identify an Out of Office Email Message

$
0
0
Hi,

Through Exchange Web Service, we retrieve messages from Inbox and process them.  Currently for Out of Office messages, I have a set up which looks for the Subject line and InternetHeaderType for the Return-Path with <> (empty) value.

What I see is, sometimes normal messages also has a Return-Path as <>.  So, the problem is, if an user deliberately uses the Subject line as "Out of Office....", there may be a problem.

Can somebody provide me a solution on how to specifically look for an Out of Office Email that is sent from the sender?

Thanks.
CB Thirumalai

Get List item version in Office 365

$
0
0

Hi All,

I am trying to fetch all the previous versions of an item in sharepoint using CSOM.

Any help would be appreciated.

Thanks

Viewing all 7132 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>