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

Failing to authenticate Calendar permission in consent screen

$
0
0

I have written an application that uses office365 REST api's to sync calendars, emails and contacts. For OAuth during the testing phase I had created a common application in Azure AD with permissions enabled for Calendar, Mails and Contacts. Now to push this application for production I want to create two different applications in Azure one for Contacts and mails and other for Calendar.

I successfully created the applications but when I try to authenticate Calendar sync, it shows me consent screen with permissions only for calendar and when I click "Accept" in consent screen I get this as response,

Array
(
[error] => temporarily_unavailable
[error_description] => AADSTS90090: A transient error has occurred.
                       Please try again.
                       Trace ID: 9bf71aee-6acc-4443-b999-8eaf58ef0f3d
                       Correlation ID: 720d3469-de71-4f03-9703-
                                       5f5cc6374232
                       Timestamp: 2015-02-18 09:50:11Z
)

The other application created only for Contacts and Mails works fine.



EWS Bug in exchange 2013 CU2 and CU3

$
0
0

Hello,

we have found a special bug, known in the Exchange 2013 CU2 and CU3, CU1 was ok. And all other Exchange Versions,  who's have just EWS like 2007 and 2010 are also ok.

We search from extern Email with the Operation FindItem with the Element Restriction for filter Emails. (message:ToRecipients and
message:CcRecipients).

Thank for a response

Bernd


[E2010] [TA] [C#] Problems inserting image in email

$
0
0

Hi everyone!

I am new to the forums, and am looking for help.

I am currently writing a transport agent (Routing agent, Exchange 2010) and am struggling to get images to display inline.

I have tried changing the AttachmentType to Inline instead of Regular, editing MIME (which is null, so I can't), and playing with the Disposition which I can't seem to change.

I have also tried advice from all over the interwebs, including:

http://blogs.technet.com/themes/blogs/generic/post.aspx?WeblogApp=postwoman&y=2010&m=09&d=14&WeblogPostName=step-by-step-how-to-create-a-routing-agent&GroupKeys=

Any advice will be very much appreciated!



Suggestions for best way to sync an app with active directory distribution lists?

$
0
0

Hi,

I posted this question in the Outlook forums, but it was suggested that I re-post here.

I was wondering what the standard / best way is to sync active directory distribution lists with another app?  Ideally I would like a user to be able to enter in the distribution list address (e.g. blueteam@testfirm.com) and then it automatically pulls into me app all the individual addresses for that distribution list.  It would then keep this list updated if any changes occurred.

I would also like the user to be able to add an email address to the distribution list from within my app and then this syncs and updates the distribution list on the exchange.

The three ways I can think of achieving this are:

1) use an Outlook addin (which syncs with my app) to update the distribution list

   Cons: requires Outlook to be open at all times for the syncing to occur

   Pros: doesn't require user to enter / store their password and username details on our app, can be stored locally on their machine

2) user a standalone program (process) that runs on 1+ exchange servers in the organisation and syncs with the app

  Cons: need to build in failover procedures, will need an IT admin setup, doesn't work with exchange online?

  Pros: would be running as long as the server is running, does not rely on users to be logged in / on outlook

3) ask exchange server admins to set up new user will permissions only to edit distribution list, then ask them to enter these details into my app and sync directly with exchange (via activesync / APIs?)

  Cons: requires new user to be set up, requires us to store username and password

  Pros: no software installation, should be running and syncing as long as our app is working

Are there any other better ways that people here would suggest?  Also, which do you think is the most likely accepted / normal solution for enterprise?

Thanks in advance for any help!

Tom

MAPI on the Middle Tier works in exchange online and architecture

$
0
0
can anybody explain me the role of MOMT in eXO i.e. MAPI on the Middle Tier working in exchange online and architecture

gSoap with (openSSL OR wininet_plugin) on windows

$
0
0

I'm using gSoap on windows, I need Authentication on exchange server for fetching their email data. Since for example on microsoft exchange server (office365) the

loginID: abcd@abcd.onmicrosoft.com

password: PASSword

If I understand correctly they use SSL so either I need wininet_plugin plugin or openSSL for this.

The chapter 19.22 of gSoap documentation (SSL on Windows) says: "For systems based on Microsoft windows, the WinInet module can be used instead openSSL"

My main aim to implement a Exchange web services which work with any exchange server to fetch and send email data, So which method of SSL is better and easy for this purpose. Also is this Auth depend on which platform this gSoap's code should run on client side.

Thank you,

How to fetch and send data from custom Exchange server using EWS in gSoap

$
0
0

I am trying to Implement a client side service which exchange data with exchange server, so i'm using gSoap here for this. Till now i'have done following:

a) create account on portal.office.com/Home so i've loginID and password for this.

b) Download a WSDL file from outlook.office365.com/EWS/services.wsdl using login with same credentials which i have in step (a).

here i want to know that if i want to access any other custom exchange server to exchange data with their different account credentials, then would i need other WSDL file corresponding to that exchange server, or can i do that with the previous WSDL file.

In other words, does WSDL file change with server to server, or all exchange server use same WSDL file. since at  w3.org/TR/wsdl.html i found that "WSDL is a language for describing web services and how to access them." So does it also depend on "from where to access them" (endpoint).

since gSoap use WSDL file to generate proxy, xml and other some header and source files, which helps to implement a client code to use that web service.

Please help me, Thank you!! :)

How to best allow an external network computer hosting an Application to trigger email Using OnPremise Exchange Server 2013

$
0
0

Hi All,

How to allow a computer installed with application to trigger email in the following scenario

1. The app server is hosted outside the corporate n\w (Hosted in some vendors Cloud n\w)

2. We are running exchange 2013 CU5

3. App vendor want to use our corporate exchange server IP / URL in their App & trigger email

4. The email ID should be in our corporate email ID format - ex: abc@domain.com

Regards,

Manju


Manju Gowda


API for office 365 from my web form

$
0
0

Hi,
I am trying to access our office 365 contact and mail from my web form through Azure:

Protected Async Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Using client = New HttpClient()
            Dim endpointUri As String, resourceId As String

            Using discoveryRequest = New HttpRequestMessage(HttpMethod.[Get], "https://api.office.com/discovery/v1.0/me/")
                discoveryRequest.Headers.Add("Authorization", "Bearer {token:https://api.office.com/discovery/}")

                Using discoveryResponse = Await client.SendAsync(discoveryRequest)
                    Dim discoverContent = Await discoveryResponse.Content.ReadAsStringAsync()
                    Dim serviceInfo = JObject.Parse(discoverContent)
                    endpointUri = "https://login.microsoftonline.com/db3f2b7e-a76f-40b3-bbbd-84c309b886e7/oauth2/authorize?api-version=1.0/"
                    resourceId = "https://api.office.com/discovery/"
                End Using
            End Using

            Using request = New HttpRequestMessage(HttpMethod.[Get], endpointUri & Convert.ToString("/me/folders/inbox/messages?$top=3"))
                request.Headers.Add("Authorization", (Convert.ToString("Bearer {token:") & resourceId) + "}")

                Using response = Await client.SendAsync(request)
                    Dim content = Await response.Content.ReadAsStringAsync()
                    For Each item In JArray.Parse(content)("value")
                    Console.WriteLine("Message ""{0}"" received at ""{1}""", Item("Subject"), Item("DateTimeReceived"))
                    Next
                End Using
            End Using
        End Using
    End Sub

But every time when I run the app I get this response error on:

For Each item In JArray.Parse(content)("value")  -> NullReference exception was handled by user code

and here is the error log:

 response    {StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:  {    x-ms-request-id: bec6dc24-eb37-4813-a5ce-5433acc73674    x-ms-gateway-service-instanceid: ESTSFE_IN_13    X-Content-Type-Options: nosniff    Strict-Transport-Security: max-age=31536000; includeSubDomains    Cache-Control: private    P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"    Set-Cookie: flight-uxoptin=true; path=/; secure; HttpOnly    Set-Cookie: x-ms-gateway-slice=productiona; path=/; secure; HttpOnly    Set-Cookie: stsservicecookie=ests; path=/; secure; HttpOnly    Server: Microsoft-IIS/8.5    X-Powered-By: ASP.NET    Date: Wed, 03 Jun 2015 13:36:59 GMT    Content-Length: 7800    Content-Type: text/html; charset=utf-8  }}    System.Net.Http.HttpResponseMessage

and the contect show the Azure login to office 365:

am I typing my Authorization or token wrong?  I got the token from Azure manage site.

Do i need to get the token or end point uri from somewhere else?

Thanks for any advice.

Dean

[EWS] Creating recurring calendar event with breakouts

$
0
0

I am using EWS (direct XML, not the managed API) to create a recurring calendar event in Office 365. And at the same time, trying to enter in breakout events such as deleted or modified instances of the pattern. I've got the basic recurrence working but the breakouts don't seem to work. I am starting off just with deleted dates, for example:

<t:CalendarItem><t:Subject>Normal daily test</t:Subject><t:Importance>Low</t:Importance><t:ReminderMinutesBeforeStart>5</t:ReminderMinutesBeforeStart><t:ExtendedProperty><t:ExtendedFieldURI PropertyTag="0x3004" PropertyType="String"/><t:Value>via TM</t:Value></t:ExtendedProperty><t:Start>2015-06-22T22:30:00Z</t:Start><t:End>2015-06-22T23:30:00Z</t:End><t:LegacyFreeBusyStatus>Busy</t:LegacyFreeBusyStatus><t:Location></t:Location><t:Recurrence><t:DailyRecurrence><t:Interval>1</t:Interval></t:DailyRecurrence><t:NumberedRecurrence><t:StartDate>2015-06-22Z</t:StartDate><t:NumberOfOccurrences>7</t:NumberOfOccurrences></t:NumberedRecurrence></t:Recurrence><t:DeletedOccurrences><t:DeletedOccurrence><t:Start>2015-06-23T22:30:00Z</t:Start></t:DeletedOccurrence></t:DeletedOccurrences><t:StartTimeZone Id="Pacific Standard Time"></t:StartTimeZone></t:CalendarItem>
The result is the error "Set action is invalid for property".  It is definitely the <DeletedOccurrences> block causing the problem; if I take that out, it works fine.  Any ideas?

Permission Denied: Connect, Error while sending email using SMTP client submission java program

$
0
0
Hi Im trying to create java program, which send email using my outlook account with my company email address.

Below is program and error im facing. please help in resolve the issue.

package com.cigniti.utilities;

import java.util.Properties;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

public class EmailUtility {
public static Session session;
public static String fromEmail="prathap.xxxx@xxxx.com";

static{
Properties props = new Properties();
props.put("mail.smtp.host", "smtp.office365.com");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "587");
props.put("mail.smtp.starttls.enable", "true");

/*props.put("mail.smtp.socketFactory.fallback", "true");
props.put("mail.smtp.socketFactory.port", "587");
props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.ssl.enable", true);
*/


session = Session.getDefaultInstance(props,new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(fromEmail,"xxxxxxx");//change accordingly
}
});
}

public String sendMessage(String toAddress,String ccAddress,String subject,String content){
String result="failed";
try {
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(fromEmail));//change accordingly
message.addRecipient(Message.RecipientType.TO,new InternetAddress(toAddress));
message.addRecipient(Message.RecipientType.CC,new InternetAddress(ccAddress));
message.setSubject(subject);
message.setText(content);

//send message
Transport.send(message);
result="sent";


} catch (MessagingException e) {
throw new RuntimeException(e);
}
return result;

}

public static void main(String[] args) {
new EmailUtility().sendMessage(fromEmail, fromEmail, "Java:Test:1", "Some messsage content");
}
}

Error Stack Trace:

Exception in thread "main" java.lang.RuntimeException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.office365.com, port: 587;
nested exception is:
java.net.SocketException: Permission denied: connect
at com.cigniti.utilities.EmailUtility.sendMessage(EmailUtility.java:54)
at com.cigniti.utilities.EmailUtility.main(EmailUtility.java:61)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.office365.com, port: 587;
nested exception is:
java.net.SocketException: Permission denied: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1706)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525)
at javax.mail.Service.connect(Service.java:313)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at javax.mail.Transport.send0(Transport.java:190)
at javax.mail.Transport.send(Transport.java:120)
at com.cigniti.utilities.EmailUtility.sendMessage(EmailUtility.java:49)
... 1 more

syncItems: syncstate very large (100k+)

$
0
0

I have just received some log files from our mobile client that uses Exchange web services with the syncItems operation.

The server (2010 SP2) of the customer sends a lot of ReadFlagChanges (several thousand over the period the log was covering) during the initial synchronization (the app started with an empty syncState).

What was even more surprising was the length of the syncState from one of those responses though: 126281 characters. That is an overhead of 123kb for each request, which is a lot if you are working on a mobile network.

Is there anything that can be done to avoid this state?

Trying to getReminders from office365 with EWS

$
0
0

I'm developing a client for the calendar of Office365 with php.

Everything is working as intented except for the GetReminders operation.

In the documentations it states that the operation is supported for Exchange 2013 and Office365 but in the services.wsdl of my office365 account there is no GetReminders element.

Is the operation deprecated?

Is there another way to  get the reminders for the calendar meetings/tasks through EWS?

Thanks.

how to test application impersonation in exchange 2010

$
0
0
how to test application impersonation in exchange 2010?

How to determine an email is external or internal on exchange online

$
0
0

Hello everyone,

i am building an app for outlook

to get inputted email when compose an email

and then determine it is external or internal

i can got them

but know, i don't know how to determine

anyone know that can share with me some guide

Thanks in advance,

QP


5 Warning with soapcpp2.exe compilation in gSoap

$
0
0

This is what i have got on cmd after run WSservice.h header file with soapcpp2.exe

C:\Users\Tushar\Desktop\zzzzz>soapcpp2 -i -C -I C:\Users\Tushar\Desktop\gsoap_2.
8.22\gsoap-2.8\gsoap\import WSservice.h

**  The gSOAP code generator for C and C++, soapcpp2 release 2.8.22
**  Copyright (C) 2000-2015, Robert van Engelen, Genivia Inc.
**  All Rights Reserved. This product is provided "as is", without any warranty.

**  The soapcpp2 tool is released under one of the following licenses:
**  GPL or the commercial license by Genivia Inc.


WSservice.h(3525): *WARNING*: identifier 'ns2__UserConfigurationPropertyType__Xm
lData' starts with or embeds 'Xml' character sequence exclusively reserved for t
he XML standard (for enum constants: please ignore this warning)


WSservice.h(7290): *WARNING*: template type 'std::vector<xsd__base64Binary>' of
attachment objects may lead to deserialization failures, use 'std::vector<*xsd__
base64Binary>' instead


WSservice.h(12370): *WARNING*: template type 'std::vector<xsd__base64Binary>' of
 attachment objects may lead to deserialization failures, use 'std::vector<*xsd_
_base64Binary>' instead


WSservice.h(14544): *WARNING*: identifier 'XmlData' starts with or embeds 'Xml'
character sequence exclusively reserved for the XML standard (for enum constants
: please ignore this warning)


WSservice.h(24953): *WARNING*: identifier 'Xml' starts with or embeds 'Xml' char
acter sequence exclusively reserved for the XML standard (for enum constants: pl
ease ignore this warning)

Saving soapStub.h annotated copy of the source input
Saving soapH.h declarations to #include
Using ns1 service name: ExchangeServiceBinding
Using ns1 service style: document
Using ns1 service encoding: literal
Using ns1 service location: http://localhost:80
Using ns1 schema namespace: http://schemas.microsoft.com/exchange/services/2006/
messages
Saving soapExchangeServiceBindingProxy.h client proxy class
Saving soapExchangeServiceBindingProxy.cpp client proxy class

that is only the upper part after this all xml and proxy files are saving successfully and at the end of this i have

Compilation successful (5 warnings)

i don't know how to solve this warnings, and are these warning will be create a problem with the development of web services?

and also in line at 

ns1 service location: http://localhost:80

 is it the endpoint url, if yes then where can i find it to change according to my requirement?

Thanks in advance for help.



Issues in executing powershell script from web service

$
0
0

Hi Guys,

1) Below is my powershell script:

#Accept input parameters  
Param(  
    [Parameter(Position=0, Mandatory=$false, ValueFromPipeline=$true)]  
    [string] $Office365Username,  
    [Parameter(Position=1, Mandatory=$false, ValueFromPipeline=$true)]  
    [string] $Office365Password,
    [string]$GroupName
)

#Remove all existing Powershell sessions  
Get-PSSession | Remove-PSSession   

#Did they provide creds?  If not, ask them for it.
if (([string]::IsNullOrEmpty($Office365Username) -eq $false) -and ([string]::IsNullOrEmpty($Office365Password) -eq $false))
{

    $SecureOffice365Password = ConvertTo-SecureString -AsPlainText $Office365Password -Force      
      
    #Build credentials object  
    $Office365Credentials  = New-Object System.Management.Automation.PSCredential $Office365Username, $SecureOffice365Password  
}
else
{   
    #Build credentials object  
    $Office365Credentials  = Get-Credential
}

#Create remote Powershell session  
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Office365Credentials -Authentication Basic -AllowRedirection
 
#Import the session  
Import-PSSession $Session
#cmds
     
$result=Get-DistributionGroup -ResultSize Unlimited  
return  $result
#Clean up session  
Remove-PSSession $Session

2) Below is my C# code

public string GetAllGroups()
        {
            int count = 1;
            string getDListScript = @"C:\inetpub\wwwroot\O365Service\Scripts\GetDList.ps1";
       
            string userName = "j*****";
            string password = "****";
            try
            {
                using (var ps = PowerShell.Create())
                {
                    Runspace runSpace = RunspaceFactory.CreateRunspace();
                    runSpace.Open();
                    ps.Runspace = runSpace;

                    ps.AddCommand(getDListScript).AddParameter("Office365Username", userName).AddParameter("Office365Password", password);
                    //IAsyncResult async = ps.BeginInvoke();
                    //StringBuilder stringBuilder = new StringBuilder();
             
                 var   results = ps.Invoke();
                 PSDataCollection<ErrorRecord> errors = ps.Streams.Error;
                 if (errors != null && errors.Count > 0)
                 {
                     StringBuilder sb = new StringBuilder();
                     foreach (ErrorRecord err in errors)
                     {
                         sb.Append(err.ToString());
                     }
                     System.IO.File.WriteAllText(@"C:\inetpub\wwwroot\RestService\bin\err.text", sb.ToString());
                 }

                 count = results.Count;

                   
                }
            }
            catch (Exception ex)
            {
                return ex.Message.ToString();
            }
            return count.ToString();

}

When i am executing the C# code on server from Console application it is working fine but when i am executing it from Webservice it is giving me the below exception

[outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.Cannot validate argument on parameter 'Session'. The argument is null. Provide a valid value for the argument, and then try running the command again.The term 'Get-DistributionGroup' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I have set execution policy to unrestricted of the server.

Please Help me on this.

Regards,

Samira

New-MailboxSearch for all items creates confirmation prompt

$
0
0

I've tried these two variations of the New-MailboxSearch command, but create a prompt I can't seem to suppress.

Try1:

New-365MailboxSearch-Name$iphName-SourceMailboxes$DisabledMailbox.PrimarySMTPAddress-InPlaceHoldEnabled$true-ItemHoldPeriodUnlimited-EstimateOnly-Confirm:$false

Try2:

New-365MailboxSearch-Name$iphName-SourceMailboxes$DisabledMailbox.PrimarySMTPAddress-InPlaceHoldEnabled$true-ItemHoldPeriodUnlimited-EstimateOnly-Confirm:$false-Force

Error:

An empty search will return all items in the source mailbox. If you don't want to copy all the items from the source mailbox, specify additional parameters to narrow the search.

Any thoughts?

Problem with Exchange server

$
0
0

Dear All,

Presently we have windows server 2012R2 ADS , DNS , GPO it's wrking fine .. and exchange server 2013 Std it's was working fine . yesterday we have a  hardware problem so physically down exchange server now .. so we diced to install new exchange server 2013 with new  hardware . here i have some doubt ...

1. Can i remove old exchange server settings in ADS server  ? or directly can i install new exchange server 2013 in new server 

or is there any issue ? please could you explain to me . i will follow your instruction ..

Best regards

Subash

[EWS] How to create and immediately accept appointments for attendees?

$
0
0

I'm using EWS to create appointments with an organizer and an attendee.  I need to "force" these appointments on their calendars, so I don't want to send them notifications or have them "accept" the meeting.  The attendees are scheduling these appointments through another interface, so accepting the meeting would be a duplicate action that we can't have.  

Creating the appointment is fine and I'm using SendInvitationsMode.SendToNone to suppress the notifications.  My plan was to immediately "accept" the meeting for them, using Appointment.Accept.  However, I'm not sure how to find the new appointment on the attendee's calendar.  If I use CalendarFolder.FindAppointments to get their appointments for the given date, this new un-accepted appointment isn't returned.  Any ideas?  Ideally, I'd love to get a list of associated appointment UIDs when creating the new appointment.  But I'd even settle for searching their calendar to find the correct appointment.  I just don't see the new appointment when I search so I'm at a loss.  

I cannot change their calendars to auto-accept since they will still receive invitations from other users as normal.  I also can't create separate appointments on their calendars since I want the organizer to have the option to cancel the meeting from Outlook.  

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>