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

Is it possible to use Certificate Based Authentication with the Exchange Web Services Virtual Directory (Exchange 2013 or 2016)

$
0
0

Is it possible to use Certificate Based Authentication with the Exchange Web Services Virtual Directory (Exchange 2013 or 2016)

We have been using CBA for EAS and are looking to find out if we can enable CBA for EWS clients as well.


Sync Contacts Slow EWS Exchange 2013

$
0
0
Hello,

I have a C# application which uses EWS to sync contacts from a database to multiple user's mailboxes.  It runs every night and loops thru the database tables. This was ok at first but now I am experiencing a strange issue. For most users, the sync happens really fast but for some users it is very slow. It can take up to 3 minutes to create a single contact. And it does not depend on the mailbox size or the number of contacts being synced.


sContact = new Contact(service); sContact.FileAsMapping = FileAsMapping.SurnameCommaGivenName; // Set contact properties name, email phone etc...

// Save try { sContact.Save(ContactFolder.Id); } catch (System.Exception e) { rtn = e.Message; }

I don't know where to look and how to debug this issue. Your help is greatly appreciated.

Thanks.
Vishnu




RESTful API support

$
0
0

Hi,

I'd like to know if RESTful API offered for Office365 products is supported on Exchange Server (2007, 2010,2013, 2016) platforms.

Thanks in advance.

Regards

How to load "MeetingRequest.IsAllDayEvent"?

$
0
0

Our app transmits the content of a Mail-MeetingRequest into a SharePoint Calendar List. There are no problems with start date, end date, location,...

But we can not get the information for IsAllDayEvent. Every time we get this exception: "This property was requested, but it wasn't returned by the server."

I already try code like this "propertySet.Add(MeetingRequestSchema.IsAllDayEvent);", but everytime we get no result, only the exception.

If anyone knows the answer, please tell me.


Booking Room Issue

$
0
0
The Exchange 2013 configured here has users and resources. We have setup a streaming notification listener on the rooms and users to notify us of any changes on the calendar. Whenever, we get a notification, we get an id of the changed calendar item and then we try to get it from the exchange store using the id returned. This works for users but for rooms, it fails with the message that the 'The specified object does not exist'. The same code works fine on a different Exchange instance.

How get the actual emailbody of email sent as riche text using PidTagRtfCompressed Canonical Property

$
0
0

I am trying to get the emailbody of the email, using ews java 2.0, sent in rich text format.

Though I am getting the text format correctly, but i am not receiving the html format of the same.

All I need is the exact representation of the emailbody in which the email was sent. So that I could reproduce the same in another system which requires html.

Is it possible for me to get it?

I tried using the PidTagRtfCompressed Canonical Property. I defined an extended property using the extended property definition with the corresponding tag(0x1009) and mapitype(binary) for the rtf emailbody. Though i did receive value in it but I am not able decode it to the corresponding readable value.

Would it be possible to get the readable value out of this extended property? Would it be possible to get the html format as well?

I would be grateful for any help.

Thanks

Access shared mailbox members

$
0
0

Hey guys,

I'm trying to access the shared mailbox members in my C# application using the EWS, but no success so far.
I tried different ways, like getting the root folder expecting that the members will be listed as permissions, or using the ExchangeService.ExpandGroup method.

Mailbox mailbox = new Mailbox("mysharedmailbox@mydomain.com");
FolderId folderId = new FolderId(WellKnownFolderName.Root, mailbox);
Folder folder = Folder.Bind(service, folderId);
int permissions = folder.Permissions.Count; // Always 0
try
{
    ExpandGroupResults results = service.ExpandGroup("mysharedmailbox@mydomain.com");

    foreach (EmailAddress emailAddress in results.Members)
    {
        string member = emailAddress.Address;
    }
}
catch (Exception exception)
{
    // For groups, it always return a "No results were found" exception.
}

I see some people saying that there is no way to access it via Unified API, but I couldn't find anything about EWS.
At this point, I'll be glad to just confirm that EWS does not have access to this kind of information.

Thank you.

Nick

Why Exchange is sending same notification twice?

$
0
0

I am using EWS managed API latest version and streaming notification to get notifications of calendar events.

But whenever, i receive an modified notificarion exchange is sending same notification twice, currently i was handling them by simple if condition, which is not a good way.

void SetStreamingNotifications(ExchangeService service)
			{
					StreamingSubscription streamingsubscription = service.SubscribeToStreamingNotifications(
					new FolderId[] { WellKnownFolderName.Calendar },
					EventType.Created, EventType.Modified);

				StreamingSubscriptionConnection connection = new StreamingSubscriptionConnection(service, 30);

				connection.AddSubscription(streamingsubscription);

				connection.OnNotificationEvent +=
					new StreamingSubscriptionConnection.NotificationEventDelegate(OnEvent);
				connection.OnSubscriptionError +=
					new StreamingSubscriptionConnection.SubscriptionErrorDelegate(OnError);
				connection.OnDisconnect +=
					new StreamingSubscriptionConnection.SubscriptionErrorDelegate(OnDisconnect);
				connection.Open();
			}

void OnEvent(object sender, NotificationEventArgs args)
			{
				StreamingSubscription subscription = args.Subscription;
				int n = 0;

				foreach (NotificationEvent notification in args.Events)
				{
					switch (notification.EventType)
					{
						case EventType.Created:
							n++;
							if (notification is ItemEvent)
							{
								// The NotificationEvent for an email message is an ItemEvent.
								ItemEvent itemEvent = (ItemEvent)notification;
								Console.WriteLine("\nItemId: " + itemEvent.EventType);
								string GUID = itemEvent.ItemId.UniqueId.ToString();

							}
							break;
						case EventType.Modified:

							if (notification is ItemEvent && n == 0)
							{
								ItemEvent itemEvent = (ItemEvent)notification;
								Console.WriteLine("\nItemId: " + itemEvent.EventType);
								string GUID = itemEvent.ItemId.ToString();

							}
							n++;
							break;
						default: break;
					}
				}
			}

So how can i handle these notification is there something which i doing wrong


Microsoft.Exchange.Management.Extension - what is it good for?

$
0
0

Hello!

I rummaged in the Server API (https://msdn.microsoft.com/en-us/library/office/dn186243(v=exchg.150).aspx) and had to find out that there is no context to find.

The namespace "Microsoft.Exchange.Management.Extension" caught my attention (https://msdn.microsoft.com/EN-US/library/office/microsoft.exchange.management.extension(v=exchg.150).aspx) but I found no information what the objects "App" and "OrgApp" are good for.

Can somebody give me a hint?

Many thanks,

Harald

Active 16 documentation on Calendar Attachments

$
0
0

Hi ,

I searched through web and msdn site but could not find any relevant documentation on Calendar Attachments support Active Sync 16 onwards.

If someone can help locate the documentation will be great help.

EWS and MailboxAutoreplyConfiguration

$
0
0

Hello,
is there a way to read OOF rules via powershell?  Im quite interested to obtain information, if any domain users are sending emails outside domain using OOF rules (message forward)

Get-mailboxautoreplyconfiguration doesnt help at all. Maybe EWS ..?

Folder.Delete - the support for the SoftDelete option

$
0
0

Hi All,

I'd like to ask if the SoftDelete option is supported for Folders by Exchange?

It seems to work fine for regular items but I've got some doubts regarding Folders as I've found two sources (see below) that seem to suggest different answers:

1. According to  https://msdn.microsoft.com/en-us/library/office/dd633631(v=exchg.80).aspx the option seems to be supported((the point 2 underneath 'To delete a folder from a mailbox'):

"the following options may be used to delete a folder:

HardDelete - A folder is permanently removed from the store.
MoveToDeletedItems A - folder is moved to the Deleted Items folder.
SoftDelete - A folder is moved to the dumpster if the dumpster is enabled.

2. on the other hand a note in https://msdn.microsoft.com/en-us/library/office/dn424760(v=exchg.150).aspx says "Folders cannot be soft deleted" (Table 1:  Options for deleting items by using EWS)

I've also noticed that Exchange EWS Manged API doesn't throw an exception when we try to use the SoftDelete option.

Is it the SoftDelete option supported for Folders by Exchange  in the end (or maybe it's just ignored)? or maybe I miss something?

Many thanks for help in advance,

Tomasz

[Exchange-Online] [EWS] [C#] [Windows]: Possibility of websocket communications?

$
0
0

Now, I know that I specified EWS as the Exchange API that I'm using, but I would be willing to change this.

A web kiosk in our lobby shows the meetings for the day on a read-only display. Right now I'm using AJAX polling to EWS to get the data. I would like to receive the data via a websockets connection. This is pretty easy with SignalR, an ASP.NET websockets library.

The problem is I can't figure out what the trigger would be for my server-side observer. If this were a locally owned Exchange server I might be able to figure out how properly trigger the observer to emit the changes, but since it's Exchange Online in which I have no experience (or control over), I don't even know if this is possible.

[Exchange-Online] [EWS2.2] [PS] Exchange.WebServices.Datakey conversion issues

$
0
0

I'm hoping the ExDev community can help me troubleshoot an EWS contact extraction issue I'm having. I'm using a slight variation of this ExportContactsScript but using EWSAPI 2.2 and ExVer 2013_sp1. 

The Problem: Its exporting incomplete contact lists when using the script as-is. Some users, are showing the correct count but a handful are showing an incomplete list, or just a 1kb file with a single entry of "".

Troubleshooting Steps: I'm working with just one user and have confirmed he has 2400+ contacts in the root folder "contacts". Get-MailboxFolderStatistics confirms this, as well as doing a direct export as him from 365. If I extract by just doing a raw finditems against the contacts folder, it exports the correct amount of 2400+ contacts, but some of the most important fields are raw and in a non-readable format. PhysicalAddress/IMaddress/EmailAddress just show as their dictionary name (ie Microsoft.Exchange.WebServices.Data.EmailAddressDictionary).

This script accounts for that, but I believe that's where the breakdown is. In all honesty, this part of the script where he's enumerating/extracting the keys from the dictionary properties is where I get lost and out of my element. I would really appreciate it if someone could peek at that script and help me troubleshoot the Key Property enumeration steps (starts around line 162) and help point me in the right direction as to why i'm getting such sporadic results when formatting/enumerating these contacts into readable content.



Not getting updated start time in Exchange web services

$
0
0

Hi,

I am facing a strange issue. I have created an appointment in outlook 2013 with resource as an attendee. Now in Exchange Web service application we are monitoring update event for this resource. when i update the time in organizer calendar , updated  invitation being sent to resource and update event fires, at this stage when i debug the start time for the invitee its comng as correct time.

However, when i try to find the similar item by using cleanglobalobjectid in organizer calendar then occasionally Appointment.start time and end time of appointment does not come up correctly, it still shows old time in Appointment object property.

it happens only if organizer updates calendar appointment using outlook 2013. we are using outlook 365 online exchnage at the moment.

here is my code , icaluid here is being produced by when resource gets an update and we use this icaluid to create cleangloblaobjectid to find actual appointment.

AppointmentWrapper appointmentWrapper = new AppointmentWrapper(); try { ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "mycustomprop", MapiPropertyType.String); // Create a property set that includes the extended property definition. PropertySet propertySet = new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.Subject, extendedPropertyDefinition); // Retrieve calendar folder from Organizer. var calendar = Folder.Bind(service, WellKnownFolderName.Calendar, propertySet) as CalendarFolder; if (calendar != null) { // Retrieve appointments from Organizer's calendar on the basis of clenaglobalobjectid ExtendedPropertyDefinition CleanGlobalObjectId = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Meeting, 0x23, MapiPropertyType.Binary); SearchFilter sfSearchFilter = new SearchFilter.IsEqualTo(CleanGlobalObjectId, Convert.ToBase64String(ConvertHexStringToByteArray(appointmentIcalUid))); ItemView ivItemView = new ItemView(1); //FindItemsResults<Appointment> findResults = calendar.FindAppointments(new CalendarView(appointmentStart, appointmentEnd)); FindItemsResults<Item> findResults = calendar.FindItems(sfSearchFilter, ivItemView); if (findResults.Items.Count > 0) { // Load the extended properties for the retrieved appointments this.service.LoadPropertiesForItems(findResults, new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.Id, ItemSchema.Body, extendedPropertyDefinition)); // Get the same appointment from Organizer which is equivalent to the appointment from Site Mail Box Item item = findResults.Items[0]; Appointment appointmentFromOrganizer = item as Appointment; //findResults.Items.FirstOrDefault(a => a.ICalUid == appointmentIcalUid); if (appointmentFromOrganizer != null) { // Determine whether the item has a custom extended property set. if (appointmentFromOrganizer.ExtendedProperties.Count > 0) { // Display the extended name and value of the extended property. foreach (ExtendedProperty extendedProperty in appointmentFromOrganizer.ExtendedProperties) { AppointmentExtendedProperty appointmentExtendedProperty = null; try { appointmentExtendedProperty = JsonConvert.DeserializeObject<AppointmentExtendedProperty>(extendedProperty.Value.ToString()); string meetingRef = appointmentExtendedProperty.mhtBookingRef.ToString();

log(appointmentFromOrganizer.Start); \\ this occasinly not up to date when item updated in outlokk 2013

}


Let me know if you need any other info to replicate this. 

Thanks

Nitrup

 



Separate new message text from the EmailMessage Body

$
0
0

Hello,

I have a windows service that polls Exchange mailbox for new messages via EWS API. Messages could be sent from any email provider (gmail, yahoo, etc), not just Exchange.

When new EmailMessage comes in, it could be a reply to a lengthy conversation.

I need to separate the most recent message from the rest of the conversation and display only that part to the user. 

EmailMessage Body contains the whole conversation and there seems to be no way to extract only what sender typed. 

Is there a property or any other way to get it?

If not, I looked thru emails from different email providers, and they have different separators for previous messages in the body of reply.

It could start with "From:" or "--- Originally sent by blah@blah.com" or "On Fri, Aug 12 .... such and such wrote:" , etc.

Does anyone knows where to find a list of all (or most commonly used) possible separators?

Any suggestion on how best solve this is appreciated.

Thank you


Isolda

Distinguish users, groups, shared mailboxes, rooms and equipment

$
0
0

Hey guys,

I'm using the Exchange Service method GetSearchableMailboxes to list the Office 365 users in my application.
But this method isn't listing only the users. It also lists groups, shared mailboxes, rooms and equipment.
The problem is that they don't have any difference between their properties, so I can't handle them differently or even access specific properties.

ExchangeService service = new ExchangeService(_connectionConfig.GetExchangeVersion(), TimeZoneInfo.Utc);
service.Credentials = new WebCredentials(_authConfig.UserName, _authConfig.Password);
service.Url = new Uri(_connectionConfig.ExchangeServerAddress.TrimEnd('/') + "/EWS/Exchange.asmx");

GetSearchableMailboxesResponse response = service.GetSearchableMailboxes(null, true);

SearchableMailbox[] searchableMailboxes = response.SearchableMailboxes;

This method has a filter parameter, but seems like it works as a "get by email", I couldn't do other kinds of filter.

GetSearchableMailboxesResponse response = service.GetSearchableMailboxes("testuser@mydomain.com", true);

Is there any other way to access the users? Or maybe a way to extend the SearchableMailbox object?

Thanks,

Nick


EWS for Conversation History

$
0
0

Good Morning,

We want to find all folders with the class of IPF.Note.Microsoft.Conversation  (Conversation History folders). We need to parse all mailboxes so we can find any that folks may have renamed. 

Is there a script out there for powershell to do this?

Thanks

[EWS]: How get the current user's own email address or check entered, using Exchange Web Services?

$
0
0
I have to work with external Exchange server. How can I get the own email address or check address entered by the user (that he introduced exactly own address), using EWS?
Email address is not the same as username.

How to Read Exchange Database .edb files Programmatically

$
0
0

I am planning to develop a few solutions for Exchange Server database .edb files. So can anyone suggest me how can I read EDB file content (emails, contacts, tasks and calendars etc) in original tree structure. Is there any methods or API available to do the same.

Thanks in Advance...

 
Viewing all 7132 articles
Browse latest View live


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