We are developing a module with the main goal being to track and collect information about damage inspections (insurance market). Each case has a code (e.g. L000525). Each case could be managed by several people. All the emails related to a specific case include the case code in the subject.
What we want to do is to collect and show the incoming and sent emails related to each specific case.
The idea is that any user can open a "Case management" window, select an specific case, and then get all the related information (including the emails of course).
We have to find the emails into the the mailboxes of around 20 users. So the questions are:
Which is the better way to do this? Will it consume a lot of time and resources?
We are new in the Exchange world so we are thinking Exchange impersonation, but we are not sure at all. The module is developed in Silverlight 3, WCF, SQL Server + Exchange 2007.
If the credentials used to connect to EWS have rights to access a user's mailbox then you should be able to do something like this:
var service = new ExchangeService();
service.Credentials = new WebCredentials("user_with_access#example.com", "password");
service.AutodiscoverUrl("a_valid_user#example.com");
var userMailbox = new Mailbox("target_user#example.com");
var folderId = new FolderId(WellKnownFolderName.Inbox, userMailbox);
var itemView = new ItemView(20); // page size
var userItems = service.FindItems(folderId, itemView);
foreach (var item in userItems)
{
// do something with item (nb: it might not be a message)
}
That's it. Wow, my first SO answer!
A full working example of what #smcintosh has done above is here: Office365 API - Admin accessing another users/room's calendar events. It is a full java class that should compile and run and accesses a room resource calendar. Good luck!
Related
We have a VSTO add-in for Outlook, that supports booking of resources managed by our cloud system.
In addition we support resources that are also available in Exchange as rooms to support integration with other systems.
When we perform a booking of such a room, the add-in adds the corresponding Exchange email address for the room to recipients, so it will also be booked in Exchange.
This used to work fine, but now we have received a report from a customer that they can no longer create bookings for resources with Exchange integration. The error they receive is completely unhelpful:
System.ArgumentException: Der gik desværre noget galt. Du kan prøve igen.
ved Microsoft.Office.Interop.Outlook._AppointmentItem.Save()
(in English: "Something went wrong. You can try again")
This happens when add-in attempts to save the item after adding some custom properties. I think the error is triggered by the add-in adding the Exchange rooms to recipients, since it does not happen for resources without Exchange integration.
Here is the code we use to add recipients:
var rec = ...; // custom DTO with recipient info
string recipientInfo = string.IsNullOrEmpty(rec.Email)
? rec.OutlookName
: rec.Email;
var recRecip = appointment.Recipients.Add(recipientInfo);
recRecip.Type = rec.RecipientType;
if (Current.Settings.IsEnabled(FeatureFlag.ResolveAddedRecipients))
{
using (LogHelper.TimedTask($"resolving recipient [{rec}]", Log))
{
recRecip.Resolve();
}
}
I can see from the logs, that the room recipient has email address, so above code will add by email. Also, the feature flag to resolve recipients is enabled, so the code will call resolve afterwards.
What could be going wrong here?
EDIT: Their Outlook version is 16.0.0.5071.
If the problem is isolated to the user's computer, we always recommend our IT staff to share the O365 Outlook Diagnostics Tool which analyses the outlook install, data files, plugins, cache and performs checks to identify source of issues on client computers.
Hi, all.
I need to retrieve the list of unread channel messages for each user in order to create a graph for internal use in my company. Looks like there is no "impersonate" feature available via the API. Gitlab says this discussion will be moved to the forum, and the forum redirects to Gitlab. Dead end.
var client = new RocketChatClient(url, "admin", password);
var bobMessages = client.sendAs("bob").getMessagesApi().list();
var johnMessages = client.sendAs("john").getMessagesApi().list();
var janeMessages = client.sendAs("jane").getMessagesApi().list();
Is this somehow possible?
Or do I need to manually access the database for getting this info?
I'm looking for a way programmatically find out who deleted an event on a shared Google Calendar. I have a calendar owned by an individual which is shared with their assistants who have read/write access, recently events have disappeared and we're not sure who or what deleted them.
We've previously just contacted Google (we're an Apps customer) and provided them with an eid of an event and they would get back to us the username of the person who deleted the event and which software they were using (i.e. using pocketinformant on iPad).
So instead of bothering Google each time, I'm wondering if there is a way to access this data through their APIs. We make good use of the Calendar API (v3) but I don't see any options to query a deleted event directly. I can see a cancelled/deleted event with events.list but if I query the event directly (events.get) I get a 404.
Thanks
You would need to call the Events.List method for the particular calendarID. Once you have all the events you can use a LINQ or LAMBDA function on the list to find your particular event.
var request = service.Events.List(calendarId);
request.ShowDeleted = true;
var result = request.Fetch().Items;
var calendarEvents = result.Where(c ==> c.EventID).ToList();
Firstly , I am a freshmen to outlook add-in development,Recently I read some learning material from MSDN or other tutorial, The First thing makes me confused is if I want to find something like a certain Appointment or Meeting Request from inbox, I should firstly use Application.GetNameSpace(“MAPI”) to get a NameSpace instead of getting some kind of object like Folder or Appointment Collections and so on.
I don't understand the Data Store Access pattern of Outlook 2007 in Add-in development. I hope someone can help me better understand Data store access of outlook 2007.
A MAPI Session is required to interact with an Outlook Data Store. Application.Session is interchangeable with Application.GetNamespace("MAPI"). You can think of a session as a connection to the Outlook Data Store.
To retrieve appointments, you can use Namespace.GetDefaultFolder.
Outlook.Folder appointmentStore = Globals.ThisAddIn.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar) as Outlook.Folder;
string apptSubject = string.Empty;
foreach (Outlook.AppointmentItem appt in appointments.Items.OfType<Outlook.AppointmentItem>())
apptSubject = appt.Subject;
I want to send email by adding bcc. But i want to hide bcc from the user. Is there any way to achieve this in windows platform using c# coding.
EmailComposeTask emailcomposer = new EmailComposeTask();
emailcomposer.To = "hello.com";
emailcomposer.Cc = "info#info.in";
emailcomposer.Bcc = "hi.com";
emailcomposer.Subject = "Regards";
emailcomposer.Body = "Hello Good Morning";
emailcomposer.Show();
There is no way to do this.
Doing so would compromise the security principles at the core of the platform as it would allow the recipient of the BCC email to see and gather people's contacts.
The basic security principle is that the app shouldn't be able to do something without the user noticing or specifically requesting it.