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

How to: Get a list of mail users by using the Exchange Management Shell

$
0
0

I'm really sorry, I'm very new VB and I'm trying to learn as I go along. I am trying to run a program that will allow me to get a list of mail users by using the Exchange Management Shell via managed code. I am running the program and I am not getting any errors but I'm not getting any results either. Can someone please help me out. Is there something I am doing wrong??

My Code:

PublicClassfrmEmailValidation

   Dim username AsString = "server\username"

   Dim password = "password"

   Dim Count AsInteger

   Function GetUsersUsingBasicAuth( _

   ByVal LiveIDConnectionUri AsString, ByVal ScehmaUriAsString, _

   ByVal Credentials AsPSCredential, ByVal Count AsInteger)AsCollection(OfPSObject)

       Dim ConnectionInfo AsWSManConnectionInfo = _

           NewWSManConnectionInfo(NewUri(LiveIDConnectionUri), ScehmaUri, Credentials)

       ConnectionInfo.AuthenticationMechanism = AuthenticationMechanism.Basic

       ScehmaUri = "http://schemas.microsoft.com/powershell/Microsoft.Exchange"

       LiveIDConnectionUri = "http://exchangeserver/Powershell?serializationLevel=Full"

       Credentials = New PSCredential(username, password)

     

       Dim RemoteRunspace AsRunspace

       RemoteRunspace = RunspaceFactory.CreateRunspace(ConnectionInfo)

       Return GetUserInformation(Count, RemoteRunspace)

       Count = 5

   EndFunction

   Function GetUserInformation(ByVal CountAsInteger, ByVal RemoteRunspace As Runspace) AsCollection(OfPSObject)

       Dim RemotePowerShell AsPowerShell = PowerShell.Create

       RemotePowerShell.AddCommand("Get-mailboxdatabase")

       RemotePowerShell.AddParameter("ResultSize", Count)

       ' Open the remote runspace on the server.

       RemoteRunspace.Open()

       ' Associate the runspace with the Exchange Management Shell.

       RemotePowerShell.Runspace = RemoteRunspace

       ' Invoke the Exchange Management Shell to run the command.

       Return RemotePowerShell.Invoke

   EndFunction

   PublicSub btnReconnect_Click(ByVal senderAs System.Object,ByVal e As System.EventArgs)

       Dim RemotePowerShell AsPowerShell = PowerShell.Create

       Dim commandResults AsCollection(OfPSObject)

       commandResults = RemotePowerShell.Invoke()

       ForEach objAsPSObject In commandResults

           MessageBox.Show(obj.Properties("Display Name").Value.ToString())

       Next

   EndSub


Impersonating user with Soap calls

$
0
0

I want to create (and delete) calendar items in Outlook 2007 (and Exchange 2007).

I do this with soap calls in SOAP UI 5.0.0.

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types"><soap:Header><typ:RequestServerVersion Version="Exchange2010_SP2"/><typ:ExchangeImpersonation><typ:ConnectingSID>  <!--<typ:PrincipalName>x@y.com</typ:PrincipalName>--> <typ:SmtpAddress>x@y.com</typ:SmtpAddress></typ:ConnectingSID></typ:ExchangeImpersonation></soap:Header><soap:Body><CreateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
                xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" 
                SendMeetingInvitations="SendToAllAndSaveCopy" ><SavedItemFolderId><t:DistinguishedFolderId Id="calendar"/></SavedItemFolderId><Items><t:CalendarItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types"><Subject>Planning Meeting - 1234</Subject><Body BodyType="Text">1234 - Plan the agenda for next week's meeting.</Body><ReminderIsSet>true</ReminderIsSet><ReminderMinutesBeforeStart>60</ReminderMinutesBeforeStart><Start>2014-07-22T14:00:00</Start><End>2014-07-23T15:00:00</End><IsAllDayEvent>false</IsAllDayEvent><LegacyFreeBusyStatus>Busy</LegacyFreeBusyStatus><Location>Conference Room 721</Location></t:CalendarItem></Items></CreateItem></soap:Body></soap:Envelope>

I created an event in my own calendar (without the typ:ExchangeImpersonation part).

So now I want to create an event in an other user's calendar.

I have an admin account, who got al rights to do this. 

But when I configure my endpoint and Authorization (NTLM) to the admins credentials, I get this as response:

<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:ErrorImpersonateUserDenied</faultcode><faultstring xml:lang="nl-BE">The account does not have permission to impersonate the requested user.</faultstring><detail><e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorImpersonateUserDenied</e:ResponseCode><e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The account does not have permission to impersonate the requested user.</e:Message></detail></s:Fault></s:Body></s:Envelope>

Admin got all the rigths to do this (normally).

So how can I create an event in another users calendar, with SOAP calls?

Is this with the use of typ:ExchangeImpersonation ?

TY

C++ CryptProtectData - Exchange MAPI Profile - How to set variables

$
0
0

Hi,

i am trying to use the CryptProtectData function so i can encrypt my password and use it inside my MAPI profile. I am using these 2  ttp://blogs.msdn.com/b/dvespa/archive/2013/05/21/how-to-mfcmapi-create-mapi-profile-exchange-2013.aspx
and ttp://blogs.msdn.com/b/dvespa/archive/2013/07/15/create-profile-connect-mfcmapi-to-office-365.aspx articles for connecting to my hosted exchange(2013) account with MFCMAPI. When setting all my properties i am being prompted for my credentials, and there i got the problem that the field provided for the domain is too short for my domain. So i have to set these properties manually (howto is described in the second article).

Now i need to set my username and password in my MAPI profile and it seems like i need to encrpyt the password by my own (i have to build an application to do so).  I am using "MAPI Download configuration guidance.docx" (can be downloaded from - www. microsoft.com/en-us/download/details.aspx?id=39045 - the piece of code i am using is at the end of the document) for building my own application to encrypt my password (i am using the smaller example for just encrypting the password, not for creating the whole profile). There i got a lot of problems, the application didnt run on a 32bit Windows, than the crypt32.lib was missing (i had to create it by my own) and so on. Now i got it running on a 64bit machine, but now i am not sure how to provide my data to the program.  

I have the following code:

std::string stemp = "myPassword"; std::wstring stemp1 = std::wstring(stemp.begin(), stemp.end()); LPWSTR pwszPassword = (LPWSTR)stemp1.c_str();//stemp.c_str();// HRESULT hr = S_OK; DATA_BLOB dataBlobIn = {0}; DATA_BLOB dataBlobOut = {0}; SPropValue propValues[2] = {0}; // Validate parameters // Encrypt password based on local user authentication dataBlobIn.pbData = (LPBYTE)pwszPassword; // Include NULL character dataBlobIn.cbData = (::wcslen(pwszPassword) + 1) * sizeof(WCHAR);

CryptProtectData(
            &dataBlobIn,
            NULL,
            NULL,
            NULL,
            NULL,
            0,
            &dataBlobOut);

std::cout<<"\n-- ";
  std::wcout<<(dataBlobOut.cbData);
  std::cout<<" --\n";
  std::wcout<<(dataBlobOut.pbData);


Now when outputting these 2 values, for dataBlobOut.cbData i mostly get "230" (i thought that this might change when i change the size of the password, but it does not, it has the same value for passwords like "aaa", "bbb","cc" ...), and for dataBlobOut.pbData i get a Hexadezimal value  (something like 0x2cde50) i think it is the address of the variable, since pbData is a pointer.

Since i am getting the exact same values for  diffrente passwords i assume that my approach is not right. But what do i have to change to get my encrypted password so i can fill the property PR_PROFILE_AUTH_PASSWORD ?

Kind regards

P.s. since i need to verify my account to post links, but i cannot because the thread for verifying is closed i will just cripple the links

Semir


Sync only User Email Folders

$
0
0

Hey guys, 

Is there a way, when calling syncFolderHierarchy - or possibly something else, to filter only for the folders the user has created himself. This would exclude all calendar, notes, default folders like Inbox, Spam, Deleted. 

The best way I've found is just to look at the folder name and compare it to the WellKnownFolderName list of enum values and make sure the folder class is of type "IPF NOTE". This seems pretty hacky, but I don't see another choice. Anyone have a better idea?

Migration from an exchange 2003 organisation A (Exchange 2003 sp2) to another Exchange 2010 organisation B

$
0
0

Hello,

We have two Exchange organisations:

- A (Exchange 2003 SP2)

- B (Exchange 2010)

we want to migrate from A to B. the two organisations have to coexist during the migration (6 months). during this time the users have to share the same GAL and Calendar (Busy/Free informations).

What are the steps to follow ?

is there any docs/links treat this subject ?

Regards

Trying to get the FROM address of an email with EWS and VB.Net

$
0
0
This is my 1st attempt to use EWS and it's been going very well but I can't seem to get the FROM address of an email message. I have the list of messages and I can get the body and subject but I don't see the from address anywhere. I'm assuming I 'm missing something simple. Any guidance in the right direction would be greatly appreciated

Exchange Powershell script gives dr Watson

$
0
0

Hi,

When running a powershell (scheduled) through a batchfile I get a dr. Watson error:

WARNING: An unexpected error has occurred and a Watson dump is being generated:
 Operation is not valid due to the current state of the object.
Get-ActiveSyncDeviceStatistics : Operation is not valid due to the current
state of the object.
At D:\Scripts\ActiveSyncExport.ps1:34 char:27
+ $Devices = $Mailboxes | %{Get-ActiveSyncDeviceStatistics -Mailbox
$_.Identity} | ...
+                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-ActiveSyncDeviceStatistic
   s], InvalidOperationException
    + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Excha
   nge.Management.Tasks.GetMobileDeviceStatistics

But when I run this script from the Exchange Management Shell manually it works normally.

I tried this in the script, but that doesn't work either:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://casserver.ourdomain.com/PowerShell/ -Authentication Kerberos
Import-PSSession $Session

The servers are running Exchange 2010 SP3 with rollup 2.

It looks like a sort of buffer overflow error.

Does anybody know a solution?

Powershell - Get-MailPublicFolder Bug

$
0
0

Hey,

i found a very weird behavior at the Get-MailPublicFolders.

The MSDN-Doc. says that the command returns only the folders they are mail enabled.

http://technet.microsoft.com/en-us/library/bb124772%28v=exchg.140%29.aspx

(We are using a Exchange 2010 ).

But in my case - it returns all SMTP-Addresse from any Public Folder (round 3000 items). However i know only from this 3000 items are 20 truly "mail enabled"!!

The absolute funniest is that a

Get-PublicFolder -Recurse -ResultSize unlimited | where{$_.MailEnabled -eq "True"}

returns the right count (20 items) ??!? What?? Why cant the Get-MailPublicFoder command read this property??

Can sobody evluate this ?? Or is there a fix?

Thanks in advance !!

Sbidy



Can not connect remotely to Exchange online server from azurewebsites and webjobs using powershell command New-PSSession

$
0
0
I tried to use powershell script and C# code:            using (var ps = PowerShell.Create())
            {
                ps.AddScript(scriptText);
                ps.AddParameters(strArray);
                var result = ps.Invoke();
            }

Running Powershell script using script file and cmd runner gives the same result. The problem part of powershell script is in:$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection; Import-PSSession $Session; We get the problem, logged in WebJob Run Details: New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : WS-Management cannot process the request. The operation failed because of an HTTP error. The HTTP error (50) is: The request is not supported. . For more information, see the about_Remote_Troubleshooting Help topic.+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri ht ...+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:Re moteRunspace) [New-PSSession], PSRemotingTransportException+ FullyQualifiedErrorId : WinRMOperationAborted,PSSessionOpenFailed Import-PSSession : Cannot validate argument on parameter 'Session'. The argument is null. Supply a non-null argument and try the command again. Local run works perfect, but I need the application to be hosted in azure. How can I solve this issue?

CDOEX Interface "put_BCC" behavior

$
0
0

 

 

We use the CDOEX Interface "put_BCC" to add BCC header in a message, and then deliver the message via Exchange Pickup folder.

This is interface description:

http://msdn.microsoft.com/en-us/library/aa565628(v=exchg.80).aspx

 

In old CDOEX, the Interface "put_BCC will" adds "BCC" header, for example, below is what the MIME looks like:

===cut====

thread-index: Ac+AbP5ap/m1Fg+BS8+EVFRqzejVxg==

Thread-Topic: Test Message

From: "Administrator" <administrator@do.not.reply>

Bcc: <test1@stserver.com>

Subject: Test Message

===cut====

 

But I don't know from which version of CDOEX, the Interface "put_BCC" not add "BCC" property, but add "X-Receiver" to instead. For example, the MIME looks like:

======cut====

X-Receiver: User1@test.com

X-Sender: administrator@do.not.reply

thread-index: Ac9/sf6Zg9v8kIW2RPeD1bm3jzwT3Q==

Thread-Topic: Test Message

From: "Administrator" <administrator@do.not.reply>

Bcc:

======cut====

The BCC header is empty.


My questions are:

1. In which version of CDOEX, the Interface "put_BCC" changes its behavior?

2. Is there any method to know which header is added by "put_BCC", "BCC" or "X-Receiver"?

3. In Exchange 2003, Exchange 2007, Exchange 2010, from which build of these Exchanges uses the new CDOEX behavior?

How to recover permanently Deleted Emails and Folders in Microsoft Outlook?

$
0
0

As per the version of Outlook application, the user can locate the Inbox repair tool into the system and then running this utility becomes easy for recovering the PST file.

If any problem persists relating to the PST file, you can repair the PST file with scanpst.exe by hitting the ‘Repair’ button.
Once the process of repair is executed, it becomes impossible for this tool to show you errors whenever occur.

If the process becomes successful, launch Outlook with the repaired PST file and try to do operations such as sending, receiving, deleting and so on.

Outlook PST Repair tool is the great option this software is designed with inclusive algorithm of scanning which enables fixing a lot of corruption problems.

Hence, this is completely effective tool to recover Outlook emails and other required components. This also provides the extensive support to the latest Outlook versions and Windows Operating System.

Inshort, it is preferred choice as compared to other tools. This Outlook PST Repair software is made with comprehensive algorithm for performing deep scan to recover PST files which include all precious data including mails, calendars and events, dates, sent items and so on.

YOU can Download FREE evaluation version from our site to check all the extensive features and recovery and scan processes.

You can also repair inaccessible pst file with this software, you can see your recovered pst emails in preview items , if your desire emails available in preview item.

then you need to purchase the full version license to save all these emails. If you are satisfied with this, you are at the right place to get it for a reasonable price: 

http://www.recoverfilesdata.com/outlook-pst-repair.html

Exchange 2013 Realtime Block List is Kind of Working

$
0
0

Hi Everyone.

I've been setting up a RBL in exchange 2013 using zen.spamhaus.org. The IPBlockListProviders require that the connection filtering agent be enabled. By default when running the installantispamagents.ps1, this script will not install that connection filtering agent because it only installs on an "edge" server and since exchange 2013 did away with the "edge" role, it did not get installed. I had to modify the script so it installed that connection filtering agent with all the other anti-spam agents. (We are a one exchange server shop so the CAS and Mailbox roles are on one box.)

I'm having a very weird response. The RBL list works and when I get a test email sent to me using the service at 'nelson-sbl-test@crynwr.com', I can see the Reject message getting sent back out in the agent logs and the SMTP logs. This is the message I see in the logs. Notice that the originating IP and the RBL triggering IP are the same: 192.203.178.107.

2012-12-14T01:59:04.970Z,08CFA71A75A19B4B,10.10.3.50:2525,192.203.178.107:55186,192.203.178.107
,,<>,,t***********e@*****.org,1,Connection Filtering Agent,OnRcptCommand,RejectCommand,550
5.7.1 zen.spamhaus.org has blocked your IP address (192.203.178.107) using the list
'zen.spamhaus.org'. Please see http://www.spamhaus.org/query/bl?ip=192.203.178.107 for further
information. This organization has no control over this RBL (Realtime Blo,BlockListProvider,
zen.spamhaus.org,,,,Undefined


This is a correct message and that IP address matches the Test RBL IP address spamhaus has blacklisted to check RBL filters. The IP address is added dynamically to the message with a variable in the reject message settings and should list the IP address of the SMTP server that triggered the RBL hit.

The VERY strange thing is when I trigger the RBL with the test message, exchange rejects all incoming mail for my account from any source for several minutes and rejects with that same message. I send a test message from my google account and I can clearly see in the agent log that the SMTP connection is coming from a google IP but it still rejects and issues the message that was sent in response to my test using the nelson-'sbl-test@crynwr.com'

This is the reject message sent to my google account after I sent myself an email following the RBL test message. Notice that the originating IP is a google IP and does not match the IP the the reject message claims the message came from. The log shows the originating IP as 74.125.82.179 (A google IP) but im rejecting the message because 192.203.178.107 is blocked??? The message didn't come from that IP. :

2012-12-14T02:00:06.318Z,08CFA71A75A19B4B,10.10.3.50:2525,74.125.82.179:50654,74.125.82.179,,
t***t@******.net,,t*******te@******.org,1,Connection Filtering Agent,OnRcptCommand,
RejectCommand,550 5.7.1 zen.spamhaus.org has blocked your IP address (192.203.178.107) using
the list 'zen.spamhaus.org'. Please see http://www.spamhaus.org/query/bl?ip=192.203.178.107
for further information. This organization has no control over this RBL
(Realtime Blo,BlockListProvider,zen.spamhaus.org,,,,Undefined

After a couple minutes, it clears up and I can get mail again. I just can not for the life of me figure out why all messages are rejected for several minutes after I have an RBL hit and the reject message is always referencing the the SMTP transaction that originally triggered the hit. Which in this case, is blocking my Gmail message thinking its coming forom the crynwr.com test even when the smtp logs show a completely different SMTP originating IP and Connection.

Here is my IPBlockListProvider:


RunspaceId        : 068b87d2-9c34-4ce9-ab05-eedef928cb27
RejectionResponse : {1} has blocked your IP address ({0}) using the list '{2}'. Please see 
                    http://www.spamhaus.org/query/bl?ip={0} for further information. This organization has no control 
                    over this RBL (Realtime Block List).
LookupDomain      : zen.spamhaus.org
Enabled           : True
AnyMatch          : True
BitmaskMatch      : 
IPAddressesMatch  : {}
Priority          : 1
AdminDisplayName  : 
ExchangeVersion   : 0.1 (8.0.535.0)
Name              : zen.spamhaus.org
DistinguishedName : CN=zen.spamhaus.org,CN=IPBlockListProviderConfig,CN=Message Hygiene,CN=Transport 
                    Settings,CN=Bel******ch,CN=Microsoft 
                    Exchange,CN=Services,CN=Configuration,DC=b******rk,DC=net
Identity          : zen.spamhaus.org
Guid              : 0c9b5eec-b19a-4ab5-9c6a-cb1666cf68d6
ObjectCategory    : beltwaypark.net/Configuration/Schema/ms-Exch-Message-Hygiene-IP-Block-List-Provider
ObjectClass       : {top, msExchMessageHygieneIPBlockListProvider}
WhenChanged       : 12/12/2012 10:02:36 PM
WhenCreated       : 12/12/2012 10:02:36 PM
WhenChangedUTC    : 12/13/2012 4:02:36 AM
WhenCreatedUTC    : 12/13/2012 4:02:36 AM
OrganizationId    : 
OriginatingServer : Lucas.*****.net
IsValid           : True
ObjectState       : Unchanged



Italicize

$
0
0

wasn't sure were to post this as the exchange forum wasn't able to help.

I have the following code below and use it in my exchange 2013 transport rule for email signature, I just want to make the%%Title%% part Italicized

<div style="font-size:11pt; font-family: 'Calibri' ,sans-serif; "> <br> <br> <br> <div style="font-size:14pt; font-family: 'Calibri' ,sans-serif-Bold"> %%FirstName%% %%LastName%%<br> <div style="font-size:11pt; font-family: 'Calibri' ,sans-serif; "> %%Title%%<br> %%StreetAddress%%<br> %%City%%, %%StateorProvince%% %%PostalCode%%<br> Tel: %%Phone%% | Fax: %%FaxNumber%% | Mobile: %%MobileNumber%% <br> <span style="font-size:14.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; quot;Arial&quot;;color:#D32231"><strong>%%Company%%</strong></span><span style="quot;Arial&quot;"><strong> </strong></span> <span style="font-size:11.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;quot;Arial&quot;"><span style="color:gray"> <strong>%%Department%%</strong></span></span><span style="quot;Arial&quot;"><o:p></o:p></span></p>

can you help?

Upgrading from Exchange 2007 to Exchange 2013

$
0
0

Hi There,

I have two exchange serveres 2007 SP3 and they are ruining on Server 2008 Ent and 2008 R2 Ent.

I setup a server 2012 R2 and installed an exchange 2013 on it and a friend of mine helped me on setting up the new exchange server and migrating the mailboxes.

Now all the mail boxes are transferred to the 2013,  and based on his recommendation I am in the stage of uninstalling exchange 2007 from my old servers.

I am reading about the process but based on the link below I have to do more things before uninstalling

http://www.exchangedictionary.com/articles/clean-uninstallation-of-exchange-2010-mailbox-server-guide

the instruction is for exchange 2010 and some shell commands are not working on shell 2007

I also found the link below:

http://blogs.technet.com/b/meamcs/archive/2013/07/25/part-1-step-by-step-exchange-2007-to-2013-migration.aspx

and I think I am at the stage 8 or 9, but I am not sure and also I do not know what to do if I am at the stage 8

Would you please advise me what shall I do to finish up the project or give me a link for it.

I have searched a lot but I was not able to find a straight forward instruction.

Thank you in Advance


Find an event with a specific UID using Exchange Web Services 2010

$
0
0

I am accessing Exchange Server API through code to create an appointment. I am able to add an appointment in ES but I am facing an issue to fetch existing appointments in order to update or delete those appointments.

My understanding is that providing UniqueId while binding appointment object with the service is standard method to find existing appointments. Unfortunately I can't use UniqueId in my SharePoint application as I have hundreds of existing appointments without UniqueId stored. So it is impossible for me delete any existing appointment using UniqueId. I can fetch new appointments by storing UniqueId as well in the list but I am not sure about existing on.

So I am wondering if it is possible to find an existing appointment in Exchange Server using UID instead of UniqueId?

Here is simplest form of my implementation:

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
service.Credentials = new WebCredentials("test", "test", "acme");
service.Url = new Uri("https://acme.com/EWS/Exchange.asmx");

Appointment appointment = new Appointment(service);
String UID = "D09F3FF6-1461-414C-89E8-C05BC3B66A4B";
appointment.ICalUid = UID;
appointment.Subject = "Test Subject";
appointment.Body = "Test Body";

appointment.Start = new DateTime(2012, 02, 09, 17, 30, 0);
appointment.End = appointment.Start.AddMinutes(30);
appointment.Location = "16th Floor Conference Room";

appointment.RequiredAttendees.Add("tin.tin@acme.com");
appointment.LegacyFreeBusyStatus = LegacyFreeBusyStatus.Busy;
appointment.IsResponseRequested = true;
appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

String UniqueId = appointment.Id.UniqueId;

// TODO: instead of using UniqueId, get appointment by ICalUid
appointment = Appointment.Bind(service, new ItemId(UniqueId));
if (appointment != null)
{
    //
}

Appreciate your help.


Search calendar item through EWS with UID

$
0
0

Hi

How can i search calendar item through UID? I am having my own custom unique UID attached with the meeting e.g.
< a0mS00000004k8fIAA*Kiran, 234234242, Num1, Booked, some service*O >.
I need to find calendar item with the above format UID.

I have tried in follwoing way:

Dim

 

esb AsNew ExchangeServiceBinding()

esb.Credentials =

New Net.NetworkCredential(ConfigurationManager.AppSettings("ExchUserName"), ConfigurationManager.AppSettings("ExchPassword"), ConfigurationManager.AppSettings("ExchDomain"))

 

'Provide the URL

esb.Url = ConfigurationManager.AppSettings(

"EsbURL")

esb.RequestServerVersionValue =

New RequestServerVersion()

esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1

 


'which properties will be returned

 

Dim itemProperties AsNew ItemResponseShapeType()

itemProperties.BaseShape = DefaultShapeNamesType.AllProperties

 

' Tell it you only want to look in the calendar folder

 

Dim folderIDArray As DistinguishedFolderIdType() = New DistinguishedFolderIdType(0) {}

folderIDArray(0) =

New DistinguishedFolderIdType()

folderIDArray(0).Id = DistinguishedFolderIdNameType.calendar

 

'Locate the field for search

 

Dim field AsNew PathToUnindexedFieldType() 'PathToUnindexedFieldType '

field.FieldURI = UnindexedFieldURIType.calendarUID

 

Dim fieldValue AsNew ConstantValueType()

fieldValue.Value = "a0mS00000004k8fIAA*Kiran, 234234242, Num1, Booked, some service*O"


 

Dim expr AsNew ContainsExpressionType()

expr.ContainmentModeSpecified =

True

expr.ContainmentMode = ContainmentModeType.Substring

'Prefixed

expr.ContainmentComparisonSpecified =

True

expr.ContainmentComparison = ContainmentComparisonType.IgnoreCase

expr.Constant = fieldValue

expr.Item = field

 

 

Dim restriction AsNew RestrictionType()

restriction.Item = expr

 

'Form the FindItem request

 

Dim findItemRequest AsNew FindItemType()

findItemRequest.Traversal = ItemQueryTraversalType.Shallow

findItemRequest.ItemShape = itemProperties

findItemRequest.ParentFolderIds = folderIDArray

findItemRequest.Restriction = restriction

Dim

 

findItemResponse As FindItemResponseType = esb.FindItem(findItemRequest)

For

 

Each firmt As FindItemResponseMessageType In findItemResponse.ResponseMessages.Items

sr.WriteLine(

"220")

 

If firmt.RootFolder IsNothingThen

sr.WriteLine(

"firmt.RootFolder Is Nothing")

 

ContinueFor

 

EndIf

 

 

If firmt.RootFolder IsNotNothingAndAlso firmt.RootFolder.TotalItemsInView > 0 Then

ForEach appt As CalendarItemType InDirectCast(firmt.RootFolder.Item, ArrayOfRealItemsType).Items

sr.WriteLine(

"Appointment Item ID:"& appt.ItemId.Id)

ApptID = appt.ItemId.Id

ChangeKey = appt.ItemId.ChangeKey

sr.WriteLine(

"Item Found")

 

ExitFor

 

Next

 

EndIf

 

Next

 

 



Thanks for any help

Getting GlobalObjectID from UID(Appointment created from IPhone)

$
0
0

Incase Appointment is created from IPhone i am getting UID as 'FD8436180C594341977272AAB7EF855B0' when listening through service.

http://www.infinitec.de/post/2009/04/13/Searching-a-meeting-with-a-specific-UID-using-Exchange-Web-Services-2007.aspx

If i convert this using above logic i am getting '/YQ2GAxZQ0GXcnKqt++FWw==' as GlobalObjectID.

Using this i am unable to find item through FintItem API.

How to convert this into GlobalObjectID/ how to get equivalent GlobalObjectID.

Thanks

Siva

Small business standard email issue. Shared boxes.

$
0
0

Hello,

I have a company with a setup of 10ish accounts / computers on a domain from SBS 2011 Standard.  Exchange is used.  

Every individual has their own email address on the company domain.   They all need access to to a particular box that was their "primary" email .pst file before.

I made a special account for that "main"@company.com email address.  I then opened up that box from the machines as delegates.   Everything comes up and seems to look fine.   However,  they now want to make the mail come in, but if a user deletes an entire folder the changes only happen on their computer.   

They have some older users that would ruin their folder structure for pending versus completed jobs.

I thought maybe just add a SMTP email address alias for that address in every bodies box.  Down side to that would be I'd have to import that old "main" pst individually on each computer.  

Last monkey wrench is most of them only want to send email as "main" by default. 

What do you all think? 


A lot of things wouldn't get done if it weren't for the last minute.

waad to adfs (sso)

$
0
0

Objective: to have single sign on (o365, VSO, tableau, VPN, etc) using WAAD

Is WAAD greater or equal to ADFS ?

can I manage WAAD through a gui ? *or only through PowerShell?

can  WAAD talk with local AD?   (talk to, listen to, or both?)

 any help is appreciated

I just started a job, and the business wants SSO, and azure, o365, tableau, VSO, and other things to work seamlessly with Single Sign On.

"AccessRights" property cannot be accessed after upgrade Exchange 2013 RTM to Exchange 2013 SP1 or CU6(15.00.0995.017)

$
0
0
Hello,

We have an issue after upgrade Exchange 2013 RTM to Exchange 2013 SP1 or CU6(15.00.0995.017).

1. Run the cmdlet “get-mailboxpermission | select”. It successfully returns valid values.
2. And then we run the following code to check whether a group has “FullAccess” of a mailbox.
   But the “MailboxRights” cannot be accessed.
===========cut===========================

        //check "The group" has "FullAccess" of a mailbox
        public bool CheckPermissionOfMailbox(string sMbxName, string sGroupName)
        {
            bool bRet = false;
            string strAccessRights = "";
          
                try
                {
                    string strCommand = "Get-MailboxPermission -Identity \"" + sMbxName +"\" -user \"" + sGroupName + "\" | select AccessRights";
          
                    ICollection<PSObject> mshObjCollection = CmdletWrapper.Invoke(strCommand);
                    foreach (PSObject obj in mshObjCollection)
                    {
                        foreach (Object foo in (Microsoft.Exchange.Management.RecipientTasks.MailboxRights[])obj.Properties["AccessRights"].Value)
                        {
                            strAccessRights = foo.ToString();
                            if (strAccessRights.Contains("FullAccess"))
                            {
                                bRet = true;
                                break;
                            }
                        }
                    }
                catch (Exception e)
                {
                    // Error handling
                }
            }
                return bRet;
        }

===========cut===========================


This code can run successfully in Exchange 2013 RTM, but fails in Exchange 2013SP1 and CU6.
Please help to check this issue and whether you will fix it in CU6.

Thanks.
Viewing all 7132 articles
Browse latest View live


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