Autodiscover cannot find EMailAddress - activesync

I have no idea why my xml id wrong. It has been taken from MSDN's example.
I send such xml to autodiscover of outlook.com
<Autodiscover
xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
<Request>
<EMailAddress>bhychik#live.com</EMailAddress>
<AcceptableResponseSchema>
http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
</AcceptableResponseSchema>
</Request>
</Autodiscover>
But in answer i got:
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006">
<Error Time="19:23:03.4991841" Id="0">
<ErrorCode>600</ErrorCode>
<Message>EMailAddress not found in request body</Message>
<DebugData></DebugData>
</Error>
</Response>
</Autodiscover>
What is wrong with my request?

Related

Can't remove email address from EWS contact

I'm using the ews-javascript-api to manage my EWS contacts on an exchange server.
I'm trying to update a contact object by removing an email address.
I've followed this blog post and it's got me most of the way there. However, when I remove the ExtendedProperty's for EmailAddress1 the ews-javascript-api throws an exception due to an HTTP 500 coming back from the EWS soap request to update a contact. Looking at the SOAP request, I can see that there is an empty FieldURI which is what the response error is complaining about.
Here is my soap request
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/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">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP2"></t:RequestServerVersion>
</soap:Header>
<soap:Body>
<m:UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AutoResolve">
<m:ItemChanges>
<t:ItemChange>
<t:ItemId Id="AAMkADczNzM2MTM4LTZmNWItNDBhYy05ZjcwLWUxMDc3ZDY2NjFiMABGAAAAAAC3bTmWRbrTRqYt+VZXGp68BwD5r6sZ7j5YSprMfvM2gaMkAAAAAAAQAAD5r6sZ7j5YSprMfvM2gaMkAAB4CjURAAA=" ChangeKey="EQAAABYAAAD5r6sZ7j5YSprMfvM2gaMkAAB4CkS4"></t:ItemId>
<t:Updates>
<t:SetItemField>
<t:FieldURI FieldURI="contacts:DisplayName"></t:FieldURI>
<t:Contact>
<t:DisplayName>Craig </t:DisplayName>
</t:Contact>
</t:SetItemField>
<t:SetItemField>
<t:FieldURI FieldURI="contacts:GivenName"></t:FieldURI>
<t:Contact>
<t:GivenName>Craig</t:GivenName>
</t:Contact>
</t:SetItemField>
<t:DeleteItemField>
<t:FieldURI></t:FieldURI>
</t:DeleteItemField>
<t:DeleteItemField>
<t:FieldURI FieldURI="contacts:MiddleName"></t:FieldURI>
</t:DeleteItemField>
<t:DeleteItemField>
<t:FieldURI FieldURI="contacts:Surname"></t:FieldURI>
</t:DeleteItemField>
</t:Updates>
</t:ItemChange>
</m:ItemChanges>
</m:UpdateItem>
</soap:Body>
And here is the soap response
<?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:ErrorSchemaValidation
</faultcode>
<faultstring xml:lang="en-US">The request failed schema validation: The required attribute 'FieldURI' is missing.</faultstring>
<detail>
<e:ResponseCode
xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation
</e:ResponseCode>
<e:Message
xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.
</e:Message>
<t:MessageXml
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:LineNumber>1</t:LineNumber>
<t:LinePosition>1037</t:LinePosition>
<t:Violation>The required attribute 'FieldURI' is missing.</t:Violation>
</t:MessageXml>
</detail>
</s:Fault>
</s:Body>
And finally here is the exception that the javascript api throws.
"Exception
at UpdateItemRequest../node_modules/ews-javascript-api/js/Core/Requests/ServiceRequestBase.js.ServiceRequestBase.ProcessWebException (https://sr1.genband.com/genlync/bundle-electron.js:44707:36)
at https://sr1.genband.com/genlync/bundle-electron.js:45557:41
at <anonymous>"
Finally I'll mention that I can remove an email address without removing any extended properties with the following function.
response.EmailAddresses._setItem(ews.EmailAddressKey.EmailAddress1, address.value);
However, the problem with this is, while it looks like it works, if I try to edit that contact on my outlook web interface, I get an error about some property mismatch. Looks like if I don't remove those extended properties when deleting an email, then they stay around and cause issues for other clients.
this should work in 0.9.3 version, available starting 0.9.3-dev.1 which is ews-javascript-api#next currently.

IE-11, Posted data request's response is not displayed

I'm posting Zip file of size >400MB in one of web page at Cloudapp.net (Azure hosted site) using IE as well as Chrome. After the request page redirect to result page. It takes around 15 minutes to process Zip file including upload. In Chrome it works fine but in Internet Explorer (11) the request is pending even after the Zip has been processed successfully.
What could be possible changes I can make it to wait or show results?
Following is exported NetworkData for request if could be helpful:
<?xml version="1.0" encoding="UTF-8"?>
<log>
<version>1.1</version>
<creator>
<name>Internet Explorer Network Inspector</name>
<version>11.0.9600.17840</version>
</creator>
<browser>
<name>Internet Explorer</name>
<version>11.0.9600.17840</version>
</browser>
<pages>
<page>
<startedDateTime>2017-03-23T05:01:43.105+05:30</startedDateTime>
<id>0</id>
<title/>
<pageTimings>
<onContentLoad>-1</onContentLoad>
<onLoad>-1</onLoad>
</pageTimings>
</page>
</pages>
<entries>
<entry>
<pageref>0</pageref>
<startedDateTime>2017-03-23T05:01:43.105+05:30</startedDateTime>
<time>291860</time>
<request>
<method/>
<url>http://MY_CLOUD_APP_SITE.cloudapp.net/Admin/Import</url>
<httpVersion/>
<cookies/>
<headers/>
<queryString/>
<headersSize>0</headersSize>
<bodySize>0</bodySize>
</request>
<response>
<cookies/>
<headers/>
<content>
<size>0</size>
<mimeType/>
</content>
<redirectionURL/>
<headersSize>0</headersSize>
<bodySize>0</bodySize>
</response>
<cache/>
<timings>
<send>0</send>
<wait>-1</wait>
<receive>-1</receive>
</timings>
</entry>
</entries>
</log>

SAML Response - What needs to be verified to ensure the response can be trusted?

Apologies if these seems like a duplicate but I have been searching through the posts and I cannot find exactly what I am looking for.
My web application is sending an auth request to Azure for Single Sign On. Upon receipt of the response, what field and attributes need to be verified to ensure that the assertions can be trusted and why?
An example response is here from the Microsoft documentation-
<samlp:Response ID="_a4958bfd-e107-4e67-b06d-0d85ade2e76a" Version="2.0" IssueInstant="2013-03-18T07:38:15.144Z" Destination="https://contoso.com/identity/inboundsso.aspx" InResponseTo="id758d0ef385634593a77bdf7e632984b6" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion"> https://login.microsoftonline.com/82869000-6ad1-48f0-8171-272ed18796e9/</Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
...
</ds:Signature>
<samlp:Status>
<samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
</samlp:Status>
<Assertion ID="_bf9c623d-cc20-407a-9a59-c2d0aee84d12" IssueInstant="2013-03-18T07:38:15.144Z" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
<Issuer>https://login.microsoftonline.com/82869000-6ad1-48f0-8171-272ed18796e9/</Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
...
</ds:Signature>
<Subject>
<NameID>Uz2Pqz1X7pxe4XLWxV9KJQ+n59d573SepSAkuYKSde8=</NameID>
<SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<SubjectConfirmationData InResponseTo="id758d0ef385634593a77bdf7e632984b6" NotOnOrAfter="2013-03-18T07:43:15.144Z" Recipient="https://contoso.com/identity/inboundsso.aspx" />
</SubjectConfirmation>
</Subject>
<Conditions NotBefore="2013-03-18T07:38:15.128Z" NotOnOrAfter="2013-03-18T08:48:15.128Z">
<AudienceRestriction>
<Audience>https://www.contoso.com</Audience>
</AudienceRestriction>
</Conditions>
<AttributeStatement>
<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name">
<AttributeValue>testuser#contoso.com</AttributeValue>
</Attribute>
<Attribute Name="http://schemas.microsoft.com/identity/claims/objectidentifier">
<AttributeValue>3F2504E0-4F89-11D3-9A0C-0305E82C3301</AttributeValue>
</Attribute>
...
</AttributeStatement>
<AuthnStatement AuthnInstant="2013-03-18T07:33:56.000Z" SessionIndex="_bf9c623d-cc20-407a-9a59-c2d0aee84d12">
<AuthnContext>
<AuthnContextClassRef> urn:oasis:names:tc:SAML:2.0:ac:classes:Password</AuthnContextClassRef>
</AuthnContext>
</AuthnStatement>
</Assertion>
</samlp:Response>
What i know so far.
You must verify the signature to ensure the message has not been modified.
You must verify that the certificate public key is from a trusted source or else any validly signed certificate would authenticate.
What else?
The signature - remember to check the references.
Verify that the certificate is from the right peer (as you've noticed yourself)
The Conditions of the assertion.
I'd recommend that you do not write your own code for this and instead use an existing SAML2 SP library. Getting all of this right is a lot of work (I've done it, and I'm not sure I would if I had known how much work it is).

INVALID_LOGIN_CREDENTIALS error on NetSuite, but correct credentials

I've been trying to use the NetSuite api for sometime using the netsuite gem.
I can login to the website, but when I try to authenticate from the API I get an INVALID_LOGIN_CREDENTIALS error.
This is the payload of the request:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:messages_2011_1.platform.webservices.netsuite.com" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:platformCore="urn:core_2011_1.platform.webservices.netsuite.com">
<env:Header>
<platformMsgs:passport>
<platformCore:email>email#email.com</platformCore:email>
<platformCore:password>--snip--</platformCore:password>
<platformCore:account>ACCOUNTNO</platformCore:account>
<platformCore:role type="role" internalId="ROLE"/>
</platformMsgs:passport>
</env:Header>
<env:Body>
<platformMsgs:get>
<platformMsgs:baseRef xsi:type="platformCore:RecordRef" internalId="4" type="customer"/>
</platformMsgs:get>
</env:Body>
</env:Envelope>
This is the payload of the response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>You have entered an invalid email address or account number. Please try again.</faultstring>
<detail>
<platformFaults:invalidCredentialsFault xmlns:platformFaults="urn:faults_2011_1.platform.webservices.netsuite.com">
<platformFaults:code>INVALID_LOGIN_CREDENTIALS</platformFaults:code>
<platformFaults:message>You have entered an invalid email address or account number. Please try again.</platformFaults:message>
</platformFaults:invalidCredentialsFault>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">sb-partners-java002.svale.netledger.com</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
I've just solved the issue. If you're having trouble make sure that:
You are connecting to the right environment. (non-sandbox vs sandbox)
Your user (or your role) have WebServices permission (see in Permissions > Setup)
I faced both of the issues. My account, even belonging to an Administrator role, lacked Web Services permission. And I was using the sandbox url to a non-sandbox account.
https://webservices.na1.netsuite.com/wsdl/v2012_1_0/netsuite.wsdl (non-sandbox)
https://webservices.sandbox.netsuite.com/wsdl/v2012_1_0/netsuite.wsdl (sandbox)
Another possible cause of this issue is if the password contains + or % characters. Removing these from the password fixed this for me.

DocuSign SOAP Api exception “This Account lacks sufficient permissions”

I created demo account on docusign demo site some days ago and I have the same problem "This Account lacks sufficient permissions" DocuSign.
Could you guys help me out of this? I really appreciate your help.
Update SOAP trace:
CreateAndSendEnvelope request
<MessageLogTraceRecord>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://www.docusign.net/API/3.0/CreateAndSendEnvelope</Action>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreateAndSendEnvelope xmlns="http://www.docusign.net/API/3.0">
<Envelope>
<AccountId>5b119284-64fd-4f85-877c-8825b2e73bc1</AccountId>
<Documents>
<Document>
<ID>1</ID>
<Name>a2a7b1a3efd6416ab00742a72cd00b97_DOCUSIGN_DATA.pdf</Name>
<PDFBytes></PDFBytes>
</Document>
</Documents>
<Recipients>
<Recipient>
<ID>1</ID>
<UserName>TEST 1 LAST</UserName>
<Email>TRUNGNGUYEN#INTERACTIVECONTACTCENTER.COM</Email>
<Type>Signer</Type>
<AccessCode xsi:nil="true"></AccessCode>
<RequireIDLookup>false</RequireIDLookup>
</Recipient>
</Recipients>
<Subject>sign</Subject>
<EmailBlurb></EmailBlurb>
</Envelope>
</CreateAndSendEnvelope>
</s:Body>
</s:Envelope>
</MessageLogTraceRecord>
CreateAndSendEnvelope response
<MessageLogTraceRecord>
<HttpResponse xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<StatusCode>InternalServerError</StatusCode>
<StatusDescription>Internal Server Error</StatusDescription>
<WebHeaders>
<Vary>Accept-Encoding</Vary>
<Strict-Transport-Security>max-age=7776000; includeSubDomains</Strict-Transport-Security>
<Content-Length>1394</Content-Length>
<Cache-Control>private</Cache-Control>
<Content-Type>text/xml; charset=utf-8</Content-Type>
<Date>Wed, 25 Sep 2013 16:03:23 GMT</Date>
</WebHeaders>
</HttpResponse>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>
<wsa:MessageID>urn:uuid:e12ae2b6-6328-4b5b-b553-95f422f66454</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:9f37c1cf-d875-4acd-9b88-108e9b11efc2</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-14c52cbb-7b93-4541-9867-c16654c1629b">
<wsu:Created>2013-09-25T16:03:24Z</wsu:Created>
<wsu:Expires>2013-09-25T16:08:24Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode xmlns="">soap:Client</faultcode>
<faultstring xmlns="">This Account lacks sufficient permissions. </faultstring>
<faultactor xmlns="">missing in Web.Config</faultactor>
<detail xmlns="">
<ErrorCode xmlns="missing in Web.Config">111</ErrorCode>
<ErrorReason xmlns="missing in Web.Config">This Account lacks sufficient permissions.</ErrorReason>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
</MessageLogTraceRecord>
This means that you are trying to use a feature or setting that is not enabled on your demo account. By default DocuSign enables all features on demo accounts so I'm not sure how your account got into a weird, semi-activated state.
In most situations this needs to be fixed by DocuSign on their side by someone going into your account and enabling a feature or setting.
I've gone through your account and enabled some things that should have been turned on, please try again.

Resources