Showing posts with label EWS. Show all posts
Showing posts with label EWS. Show all posts

Thursday, March 10, 2022

Aloha-oe to TravelTime

Per the fine, fine folks in Redmond:

Upcoming, we will be retiring the preview program enabling REST API access to on-premises mailboxes for Hybrid Exchange organizations.

Note: This will impact those who write code against Exchange mailboxes.

Key points

  • Timing: Beginning early March 2023, we will begin to return errors for any requests made for mailboxes that remain on-premises.
  • Action: Use Microsoft Graph for Exchange Online and Exchange Web Services (EWS) for Exchange Server on-premises
  • Roll-out: tenant level

SO WHAT THIS MEANS FOR TRAVEL TIME,

Travel Time uses REST API so it's going to start giving you return errors.

Sorry, folks, we had some fun making it and we hope you had some useful times with it.




Friday, October 22, 2021

Turning off EWS Throttling in Office 365

Microsoft must have realized this was an issue – they finally made it easier to temporarily change EWS Throttling under admin control.

And by "easier" I mean it is "possible if you know exactly what you are looking for."

So to remove EWS Throttling

Login to Exchange Admin 

Click Support and follow with New service requests.

In the search field, search for Increase EWS Throttling Policy

Select that from the list

Click Run Tests – it will first tell you are throttled (big surprise)

Click Changing EWS Settings – select 30/60/90 days

Run Tests again.  – Should now be good to go.


Sunday, January 24, 2016

Saving the configuration of an #MSFTExchange mailbox or meeting room as a CSV or TXT

We are no strangers to Exchange resources.

For those of you looking to save off the state of a conference room or resource in Exchange to a CSV please see Showing the Calendar Configuration of a Mailbox or Meeting Room using EWS by the incomparable Glen Scales for an excellent script.

You can also in an alternate simple method get the info in PowerShell and pipe it to save as a TXT file.

Get-CalendarProcessing  -Identity   Room_222@yourcompany.com  | fl > Room_222.txt

Your call what you need.

Friday, September 05, 2014

Disappearing Contact/Calendar item body fixed in Exchange 2013 CU6

We blogged about clients reporting problems with notes after inserting contacts and calendar items from Beehive and MDaemon migrations April, '14.)


KB 2975003 confirmed this was a problem! The KB says: "...compose or edit a Calendar item by using Outlook Web App...and then save the item. When you open the item in Microsoft Outlook 2013 or Outlook 2010 in online mode, the body of the item disappears."  We scrambled and updated our code to set MAPI codes to fix the problem in our code.  But they reported their end users were still having the same problem on NEW items.



Now there is a fix: install Cumulative Update 6 for Exchange Server 2013: 2961810

Tuesday, April 15, 2014

Exporting Contacts to a CSV file using the EWS Managed API and Powershell

Exporting Contacts to a CSV file using the EWS Managed API and Powershell by Glen Scales will show you how to get this information OUT of Exchange server-side if you want to.

Normally we see people wanting to put this information INTO Exchange server-side, but there are legit reasons for wanting this capability:  archiving crucial customer data from former employees, saving vital contact data, legal discovery, migrating to Google, etc.

For the same reasons you will want to check out his scripts in Export the GAL or Address list with EWS to Vcards in 2013 MEC sample 1.

Arm yourselves with knowledge.


Saturday, September 21, 2013

Contact.Birthday property in EWS

Has anyone else noticed that the Contact.Birthday property in EWS seems to not work?  We noticed the same thing with Contact.WeddingAnniversary.

It's a small nit -- but it's kind of annoying us.

Tuesday, July 30, 2013

Throttling in Exchange 2013

The way you control throttling changed in Exchange 2013.  If you recall, we set a different set of throttling attributes in Exchange 2010 when impersonating users.  Those attributes differ from user throttling attributes (this is a good thing for migrations!!) In Exchange 2010 there were seven throttling attributes.  In Exchange 2013, there are only TWO (again, we're focused on EWS impersonation access):
  • EWSMaxConcurrency
  • EWSMaxSubscriptions
To define a policy "SuThrottlingPolicy", and set it to your service account, "exsu", use the following:

 New-ThrottlingPolicy SuThrottlingPolicy -EWSMaxConcurrency $null -EWSMaxSubscriptions $null
 Set-ThrottlingPolicyAssociation -Identity exsu -ThrottlingPolicy SuThrottlingPolicy



For the inquiring minds, the following are set in Exchange 2010, but NOT used in Exchange 2013:
  • EWSFastSearchTimeoutInSeconds
  • EWSFindCountLimit
  • EWSPercentTimeInAD
  • EWSPercentTimeInCAS
  • EWSPercentTimeInMailboxRPC

Here are the errors will you see in our log files if you hit the throttling limit (taken from MSDN:)

ErrorThrottling policy parameterDescription
ErrorExceededConnectionCountEWSMaxConcurrency Indicates that there are more concurrent requests against the server than are allowed by a user's policy.
ErrorExceededSubscriptionCountEWSMaxSubscriptions Indicates that a user's throttling policy maximum subscription count has been exceeded.
ErrorExceededFindCountLimitEWSFindCountLimit Indicates that a search operation call has exceeded the total number of items that can be returned.
ErrorServerBusyEWSPercentTimeInMailboxRPC
EWSPercentTimeInCAS
EWSPercentTimeInAD
Occurs when the server is busy. The BackOffMilliseconds value returned with ErrorServerBusy errors indicates to the client the amount of time it should wait until it should resubmit the request that caused the response that returned this error code.

Or, the HTTP status codes that are returned by throttling errors:

HTTP status codeDescription
HTTP 503Indicates that EWS requests are queuing with IIS. The client should delay sending additional requests until a later time.
HTTP 500Indicates an internal server error with the ErrorServerBusy error code. This indicates that the client should delay sending additional requests until a later time. The response may contain a back off hint called BackOffMilliseconds. If present, the value of BackOffMilliseconds should be used as the duration until the client resubmits a request.
HTTP 200Contains an EWS schema-based error response with an ErrorInternalServerError error code. An inner ErrorServerBusy error code may be present. This indicates that the client should delay sending additional requests until a later time.

Sunday, January 20, 2013

SuHoliday cmdlet and Exchange 2007

We've gotten a few inquiries about running the SuHoliday cmdlet on Exchange 2007 instead of Exchange 2010.

Short answer: Yes you can do it.  Nothing the the was we use the EWS API is specific to Exchange 2010 to the exclusion of Exchange 2007.

However, setting Permissions in Exchange 2007 IS VERY different from Exchange 2010, so you will have to adjust for that.  Taking all of the Exchange 2007 permissions stuff out of the documentation made it substantially shorter and clearer,

If you need help look at posts in this blog involving Permissions and Exchange 2007.

Wednesday, November 28, 2012

Holidays into #Exchange and #Office365 via Server-Side Tools

We've just upgraded our cmdlet for inserting holidays server-side into Exchange 2010.  We'll give you some more details about that in a later post.

Mainly we're writing because we've just completed a site that lets you upload holidays into Office 365 without the cmdlet.



We're treating it as a beta right now -- but we want folks to try out the online experience since it's one of the easiest ways to actually see how the full cmdlet works.  The "Buy" button will not be active until next week or so.

We've tried to make the web interface as easy as possible.  Folks who have been through a migration with us will also recognize our 1930's Soviet tractor style of user interface (not pretty but it works -- if the market responds well to this we've already got plans to update it). And since we traditionally use Jimi Hendrix as a sample account we are announcing this shortly after after his birthday.

You will need credentials for a service account that has Impersonation permissions to any of the accounts you want to modify.  This will be no surprise to any Exchange administrators.  The full manual for the cmdlet goes over how to do this.  

Then you select if you want to insert into a single calendar or upload a list of calendars to insert.

And the default calendar list goes right into Jimi's calendar.

Note that you can also remove inserted holidays automatically but leaving all other calendar data intact.

The web-based version allows you to do select a list of SMTP addresses to insert at once.  In the unlicensed version we limit this to 25 users per day, and only allow you to select US or UK holidays that we have already defined.

The full cmdlet allows you a lot more functionality: multiple time zone support, script-ability, and LDAP query insertions.

For the record, US Federal Holidays came from http://www.opm.gov/operating_status_schedules/fedhol/2013.asp  Our default file will insert JUST THIS LIST (i.e., NO “Day after Thanksgiving”) and we left Veteran’s Day a ”Free” day rather than a Busy day,

UK bank holidays came from this list https://www.gov.uk/bank-holidays 

Monday, June 25, 2012

Where did the HTML in my note body go?

One of our customers asked us to put up a custom message in the Sumatra Holiday tool.  This message needed a small bit of HTML formatting in EWS Managed API v1.2 code.  A "slam-dunk."  Yet this simple HTML produces horrible output:



Microsoft published a KB article that confirmed the problem:  meeting request that you send from an EWS application is in plain text format instead of HTML format when an attendee opens the request by using Outlook in online mode

The fix? Patch your servers! Here's the link: Update Rollup 3 for Exchange Server 2010 Service Pack 2 (KB2685289)

We patched our dev server this weekend and confirmed it works!

(PS: we're tagging this as an API bug, but it really isn't.....

Saturday, April 14, 2012

Test insertion: 401 or 500 error resolution protocol


Suppose you're testing your permissions and get either a ‘500’ or a ‘401’ error.

Use the following table to sort those issues out.


HTTP
Response
Most Likely Issue
Solution
500
The "test user" does not exist in Exchange 
or 
is not mailbox enabled
Verify account exists in the domain, it is enabled, a mailbox user  (try to access the account in OWA using the service account credentials)
The "SERVICE ACCOUNT" cannot impersonate the "test user"
Verity  there is a management_role assignment "ApplicationImpersonation" (Ex10) or ExtendedRights:"ms-Exch-EPI-Impersonation","ms-Exch-EPI-May-Impersonate" (ex07) for the SERVICE ACCOUNT that is applied to the server or the user you are attempting to test.
401
BASIC authentication is not enabled for the EWS virtual directory in IIS
Set Basic authentication in IIS;  remember to restart IIS
The "SERVICE ACCOUNT" is not authorized to submit requests to the CAS Server
Is this the account you granted impersonate rights to? Are the creds correct?  Paste the "ews url" into a browser.  Enter the service account creds, when prompted.  Do you see an EWS WSDL page?


Start with IIS Basic authentication on the EWSvirtual directory.  It’s the easiest to see / fix.

Friday, May 13, 2011

Creating All Day Events with EWS in Office365

You might remember our recent post:




about the head trip that we went through with migrating all day events into Exchange using EWS and how weirdly the display was different between versions of Outlook and OWA.


Well we're adding this to tell you it's the same head trip in Office365 (no real surprise there but we just feel the need to document it).


Thursday, December 09, 2010

EWS, Outlook Live, Exchange Release Levels, OWA, and WTF?

Come with us on a journey to mystery.

The subject started out as Holidays but morphed into the more general one of All Day Events (ADEs).

Using EWS, it is possible to insert ADEs and we do LOTS of them in the course of a migration.
BUT, some combination of EWS, Exchange release levels, and OWA are currently giving our usually stable process conniption fits.

Start off with inserting an ADE under either Exchange 2007 rules (with deprecated Time Zone, rules, but bear with us for a moment here) into Live@Edu (not that we have a client trying to do this exactly now or anything like that).

In Outlook attached to Live @ Edu they will appear correctly (as below) if you specify Exchange 2007 SP1. But it will appear as a two day banner if you specify Exchange 2010.

JUST to keep thing really really interesting, viewing the EXACT SAME ADEs in OWA shows the 2007 SP1-defined ADE showing up correctly, and the 2010-defined ADE spanning THREE days:

If your head does not hurt you have not been paying attention.
SO, for the time being while running a holiday insertion with our tools, specify Exchange 2007 SP1. Everything will be hunky-dory.

Don't believe us? Here's the VB .net code (we use Exchange Web Services Managed API v1.1. )

Public Function ewsBuildAllDayEvent() As String

Try

Dim myUserEmail As String = "user10@test.com"
Dim myEWSURL As String = "https://sn1prd0202.outlook.com/EWS/Exchange.asmx"
Dim myExchangeVersion As ExchangeVersion = ExchangeVersion.Exchange2007_SP1
Dim myLogon As String = "admin@test.com"
Dim myPassword As String = "Gu3ssWh0"
'create Service
service = New ExchangeService(myExchangeVersion)
service.Url() = New Uri(myEWSURL)
service.Credentials = New WebCredentials(myLogon, myPassword)
service.ImpersonatedUserId = New ImpersonatedUserId(ConnectingIdType.SmtpAddress, myUserEmail)
'build appointment
Dim appointment = New Microsoft.Exchange.WebServices.Data.Appointment(service)
appointment.subject = "MyTestADE"
appointment.Start = CDate(Now.ToShortDateString)
appointment.End = CDate(DateAdd(DateInterval.Day, 1, Now))
If myExchangeVersion = ExchangeVersion.Exchange2007_SP1 Then
appointment.StartTimeZone = System.TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")
Else
appointment.StartTimeZone = System.TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")
appointment.EndTimeZone = System.TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")
End If
appointment.LegacyFreeBusyStatus = LegacyFreeBusyStatus.Busy
appointment.isalldayevent = True
appointment.Save(SendInvitationsMode.SendToNone)
Return "OK"

Catch ex As Exception
Return ("ERROR: " & ex.Message)
End Try

End Function