Mailapp makeEwsRequestAsync 401 unauthorized error - exchange-server

We have a mailapp addin implemented. We have encountered a strange error if we installed the addin in mailbox, which is in Excahnge 2016. There is some problem with EWS requet. We are using office.js to make request to exchange 2016.
makeEwsRequestAsync(data, callback, [userContext])
The above method is used to communicate with exchange. So if mailapp is installed on Exchange 2016 and we request some additional properties from email via above function we receive an asyncResult object with error:
error code: 9020
message: Remote server returned an error: (401 Unauthorized)
In documentation there is a note that in exchange the OAuth should be enabled.
NOTE: The server administrator must set OAuthAuthentication to true on the Client Access Server EWS directory to enable the makeEwsRequestAsync method to make EWS requests
We have checked this setting and it is set up. What else should we check? Any suggestion?

Please find update download here: https://technet.microsoft.com/en-us/library/jj907309(v=exchg.160).aspx

Related

How to get Team id where Teams bot is installed

In Microsoft Teams, how to retrieve team-ids where the bot is installed if the server missed the installation callback webhook?
I tried using the API GET /v3/conversations?continuationToken={continuationToken} mentioned here, but it gave HTTP 405
{
"message": "The requested resource does not support http method 'GET'."
}

Establish bot to bot communication in Microsoft Bot Framework

I have 2 published bots in Azure. Now, I would like to establish communication between bots.
Using Skill bot concept, I can able send message from parent bot(Bot1) to child bot (Bot2). once Bot2 received the message it throwing below error:
Error 403 - This web app is stopped.
The web app you have attempted to reach is currently stopped and does not accept any requests. Please try to reload the page or visit it again soon.
If you are the web app administrator, please find the common 403 error scenarios and resolution here. For further troubleshooting tools and recommendations, please visit Azure Portal.
Also , I am getting below error at Bot1:
[onTurnError]: Error: Request failed with status code 500
[onTurnError]: [object Object]
[onTurnError] unhandled error: Error: Request failed with status code 500
I didn't find any other errors except above mentioned information /error.
please suggest me what I am doing wrong here.
I look forward for your suggestions/corrections. Really appreciate for your response.

makeEwsRequestAsync randomly generates error

I'm using Office JavaScript API to edit and save emails through an Add-in.
To get all attachments of an email, I use makeEwsRequestAsync. Most of the time the method is successful but sometimes it returns this error:
Failed to make a request via HttpWebRequest.
Exception: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
{
"value": null,
"status": "failed",
"error": {
"name": "GenericResponseError",
"message": "Failed to make a request via `HttpWebRequest`. Exception: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.",
"code ": 9020
}
}
I'm working with Outlook 2016 Online (Office 365 ProPlus Version 1711) and I got the error on Windows 10 machine using both Chrome and Edge browsers.
EDIT:
Here is the full scenario:
Create new email
Hit send button
Add-in will intercept send event
Add-in saves email under draft using Office.context.mailbox.item.saveAsync that will return itemId
Once itemId is returned, try to load email headers and attachments (in parallel) by calling two makeEwsRequestAsync methods (using itemId with properly formated XML)
I can only think about 3 issues:
Is it possible that saveAsync returns an itemId that does not exist yet?
But in this case, I'm expecting a different error message.
Does calling 2 makeEwsRequestAsync simultaneously is problematic?
I don't think so. JavaScript is single threaded and the 2 methods are never called at the same time.
Is there a session timeout to communicate with EWS API?
Also, The error happens in different mailboxes and there is no other prior or post error.

Google location auto complete is not working on aws server

I am using google location autocomplete at aws server its not working and the same code i am using on another server its working fine you can check here AWS==> http://52.91.226.167/testgeo.php other server==>http://142.4.10.93/~vooap/alcohol/test.php geocomplete needs any server side setting ?
You should use a valid API key as mentionned in the message received when the autocomplete message is sent:
You can see this message under Network panel in developer console. Each time you hit a key in the input, an ajax request is sent and you receive this message.

Error message when using google contact api

When I try to fetch contacts from gmail, I received this error message:
The page you have requested cannot be displayed. Another site was requesting access to your Google Account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error. A detailed error message follows:
The site "http://url.com" has not been registered.
May I know how to rectify it? Thanks!
Have you tried registering the domain with Google's API?
docs:
https://developers.google.com/accounts/docs/RegistrationForWebAppsAuto#new
resgister url:
https://accounts.google.com/ManageDomains
Also if you are making calls from http and not https you may be seeing problems there too.

Resources