Exchange2007 WebServices - AddDelegate - exchange-server

Im working with Microsoft Exchange WS 2007 (JAX-WS) and need to use the delegate functionality.
I have created a Java client which generates a SOAP request which adds delegate access.
<AddDelegate xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<Mailbox>
<t:EmailAddress>delegateEmail#mail.com</t:EmailAddress>
</Mailbox>
<DelegateUsers>
<t:DelegateUser>
<t:UserId>
<t:PrimarySmtpAddress>primaryEmail#mail.com</t:PrimarySmtpAddress>
</t:UserId>
<t:DelegatePermissions>
<t:CalendarFolderPermissionLevel>
Editor
</t:CalendarFolderPermissionLevel>
</t:DelegatePermissions>
<t:ReceiveCopiesOfMeetingMessages>
false
</t:ReceiveCopiesOfMeetingMessages>
<t:ViewPrivateItems>
false
</t:ViewPrivateItems>
</t:DelegateUser>
</DelegateUsers>
<DeliverMeetingRequests>DelegatesAndMe</DeliverMeetingRequests>
The response contains success code. Then to verify the addDelegate method i call the getDelegate operation which displays the new primary address i have added. However when i try and book an outlook resource using the createItem EWS operation using delegate email address i get this message;
The specified object was not found in the store
Also if i open my outlook desktop client and navigate to tools -> options -> delegates tab there are no delegates present.
If i add the delegate through the desktop client and then call my createItem operation it works fine. I want to be able do this for other users however without having to ask them manually add the delegate.
Any idea why this behavior is happening?

I was able to use the EWSEditor http://archive.msdn.microsoft.com/ewseditor which allowed me to discover that i was assigning delegate permissions to the wrong smtp account. Once i corrected this mistake the process worked.

Related

Log incoming and outgoing emails using Outlook web add-in

I have a working VSTO COM based Outlook add-in that intercepts all incoming/outgoing emails on a desktop outlook which is then used to save the details of the email into a SQL database. Below is a brief description of the steps I take using the add-in:
Intercept an incoming/outgoing email and adds a custom GUID as a user property on the email
Calls an end-point to my custom Web API on the cloud and sends an XML with details like the GUID (saved above) and other mail related ids and details
The API end-point saved the details into a SQL database and returns the response back to Outlook so that Outlook doesn't freeze up
A windows service runs in the background and monitors this SQL database for email items and makes a Web API call to Exchange or Office 365 to find the email using the GUID user property and then save it where needed.
I cannot save the email directly via the API call from VSTO add-in since there is some custom time-consuming logic that happens in the API so I cannot keep Outlook frozen for that time.
Is it possible to create something similar using the newer Outlook Web Add-in?
Kind of - you can intercept outgoing messages, but if you do, your addin won't be eligible to be published in the store.
It is still much easier in a VSTO addin. You cannot access Outlook Object Model from a secondary thread, but you can still run your code that does other things. Once you are done, you can access OOM on the main thread by opening message that you need to process by its entry id saved before you started the secondary thread. Note that the inability to access various objects from a secondary thread is OOM specific - Extended MAPI objects can be accessed from secondary threads, but Extended MAPI requires C++ or Delphi. In other languages (including all .Net languages), you can use Redemption (I am its author) and its RDO family of objects - all you need to do is save the value of the Application.Session.MAPIOBJECT property in a dedicated variable, then on a secondary thread create an instance of the RDOSession object and set its MAPIOBJECT property to the variable you saved on the main thread (see http://www.dimastr.com/redemption/faq.htm#Threads for more details).

Microsoft Teams messaging extension can't call TeamsInfo methods

I am developing a Microsoft Teams messaging extension with action command and wanted to get the info on the person logged in and try to get his email address to verify on our server if he is authorized to access this or not. The context object only returns the AADObjectID which is not very useful but the email can be used to authorize them. In order to get the email I got to know that I have to make a call to TeamsInfo object and use member info API on it. Although using the api gives me "The bot is not part of the conversation roster" error. Looking into it i realized that i might only be able to call it because you can't really install a messaging extension alone. Is there a way my messaging extension can get the email of the logged in person without asking them to login again because they already are logged in into Teams?
So apparently if you want to call methods in TeamsInfo class you need to have a bot and messaging extension both configured together. If you only have messaging extension it won't work.

Outlook add-in - attachment ID's not working correctly in desktop app, but work on web app

I've developed an add-in for Outlook, it needs to be able to access attachments to emails.
On the desktop app, if I move an email with attachments from a shared folder to my main inbox, then try to run the add-in on it, i get the error:
The specified attachment Id is invalid.
However, if I perform exactly the same operation through the web app, it works fine.
I have checked and the Office.context.mailbox.item.itemId and Office.context.mailbox.item.attachments[i].id are exactly the same whether on web or desktop.
Emails with attachments that have not been moved from a different folder, and emails without attachments work fine.
I am fetching the attachment on a remote server through a PHP script, using a callback token I orginally get from Office.context.mailbox.getCallbackTokenAsync. The requests are made via EWS requests.
I am running Office 365 and the Outlook version is 1910 (Build 12130.20390), running on Windows 10.
Can somebody please help?
After some helpful suggestions from #OutlookAdd-insTeam-MSFT, I've come to a solution for this.
The problem is, after moving a message from a shared folder to the main inbox, when using the desktop app, the Office.context.mailbox.item.attachments (created when we run Office.initialize) no longer returns the correct ID's, instead it seems to return the old cached/out of date ID's from before the email was moved. The ID's returned when using the web app are correct using this method.
However, requesting the ID's from the exchange server, via an EWS request (or a REST call, but I use EWS) always returns the correct attachment ID's, whether called from the web app or the desktop app.
So, the solution I have come to is to make sure and request all of the attachment ID's from the exchange server, rather than using the Office.context.mailbox.item object. It means adding in an extra step of having to get a callback token first to then be able to request the info from the exchange server, but it means you always get the correct ID's.
I hope this is of help to someone else.

Disallow user to make a call when there are no more credits: Sinch Javascript SDK

My application allows unlimited instant messages for free, but takes credits for calls. I want to be able to disallow user to make a call when he does not have any more credits. How in a ideal scenario is this managed using javascript SDK?
I am coming from a standpoint, that although I am able to control this behavior through some validations in code itself, but what happens when the user is a hacker? He can go to console and call javascript methods of its own such as removeListeners and then callClient.callUser(userId). How do you protect sinchClient in such case? Thanks.
Note: I am open to provide more information if the question is not clear.
Sinch exposes a REST based callback mechanism to control your call flow. You can set a callback URL in the Sinch Portal under Applications >> Voice and Video settings. Each call will then trigger a Incoming Call Event (documented here: https://www.sinch.com/docs/voice/rest/#callbackapi) and you can control whether or not to connect this call via the callback response.

Glympse API event handling

I am trying to launch glympse app by using an intent and receiving the information through broadcast. Is there any way that I will be notified about the events occurring like ticket removed, expired, updated etc?
There sure is.
We created a library project to make this easier for you. It can be found here: https://github.com/Glympse/glympse-app-sdk/tree/master/Android/GlympseIntentsLib
A sign-in is required to view these documents that might be helpful.
Tutorial: https://developer.glympse.com/Content/client/app/guides/Glympse_Intents_Tutorial.html
Reference Docs: https://developer.glympse.com/Content/client/app/guides/Glympse_Intents_Reference.html
Specifically, check out the method CreateGlympseParams.setCallbackAction(String). This will allow you to set an action which will be used to broadcast a message back to your app.
Another option is to use CreateGlympseParams.setEventsListener(EventsListener). With this method, you can supply an object that implements GlympseApp.EventsListener. Using this method, our library handles the broadcast under the covers and your object's methods will be invoked as the event occur.

Resources