access exchange 2003 calendars with vs2005+ - visual-studio

I'm looking for a way to access Exchange 2003 calendars to add appointments. I'm hoping to use an admin account and impersonate each user to add appointments which i'm pulling from an oracle database. I've seen lots of examples for Exchange 2000 using cdox.dll which are exactly what I'm looking for but not an equivalent for 2003. I have Exchange management tools installed on the development workstation. Would I be able to download cdox.dll and use that?
Examples/links are greatly appreciated. Thanks.

This is the same problem I'm banging my head against....
You can work with calendars using webdav:
http://golemlab.wordpress.com/2009/09/13/php-owa-2003-calendar-fun/
But to impersonate a user you need an admin account with access to his calendar folder.
From what I understand there is no way to set defaults permissions just for calendars that are not created yet.
Also please note that the Calendar folder name is dependant on the user client language (ex: "Calendar" for a user with an english outlook, "Calendario" for italians).
You can set permissions on existing calendars using a lot of different tools:
pfdavadmin is a microsoft endorsed one:
http://www.itexperience.net/2008/10/22/set-calendar-permissions-with-pfdavadmin/
or you can try setperm:
http://www.amset.info/exchange/folderpermissions.asp
there are also some commercial products like folder permission manager:
http://www.symprex.com/products/folder-permissions-manager/
What I'd really wished was the possibility to set defaults calendar permissions on a server level , but this looks really not possible.

Related

Reading/Writing M365 Admin contacts

An administrator for a Microsoft 365 domain can create external contacts that are visible to users within that domain. Those contacts can be seen in the M365 Outlook client under "Directory->All Contacts" or "Directory->Default Global Address list".
I need to use EWS to read and create these contacts. As a first step I'm just trying to read them, using FindFolder, against MsgFolderRoot of a user. Unfortunately the only contact folders that show up are the ones defined for the user in question, not the external contacts created by the Admin. There are several contact folder classes that seem promising, such as "OrganizationalContacts" and "ExternalContacts" but there are no entries in those folders.
I could also use Graph for this if the capability is there. Any help on this problem would be appreciated.
Directory contacts exist in the Directory eg Azure AD or the local AD onPrem neither EWS or Graph can create these type of contacts then only thing automatable that can do that is https://learn.microsoft.com/en-us/powershell/module/exchange/new-mailcontact?view=exchange-ps
For reading Directory contacts the Graph is a better option it has a supportable endpoint via https://learn.microsoft.com/en-us/graph/api/resources/orgcontact?view=graph-rest-1.0. EWS can do this via FindPeople but it's not documented and requires that you know the addressbook guid which isn't available via EWS.

Is it possible to be a delegate with create, update and delete own permissions but not read in exchange 2010

I have a service account that I want to be able to access another users calendar through the ews api in such a way that it can create appointments, update appointments they have created and delete appointments they have created but NOT be able to read all items on the users calendar.
This appears to be possible in office 365 (see screenshot) but is it possible with Exchange 2010? If so how?
Sure the image you have posted is just the Folder permissions from Outlook these permission are the same from Exchange 2007 to Office365. The two ways you can set permission pro-grammatically like you have shown is first use one of the Mailbox Access API's like Mapi or EWS and set the Folder permission eg https://msdn.microsoft.com/en-us/library/office/dn641962(v=exchg.150).aspx
Or you can use the Exchange Management Shell and Add-MailboxFolderPermissions https://blogs.technet.microsoft.com/ilvancri/2009/11/24/exchange-2010-and-then-there-is-the-long-awaited-cmdlet-add-mailboxfolderpermission/ this can be a better approach as it just requires delegated admin rights via an RBAC role where setting the folder permission via EWS because it uses a User API would require the account setting those permissions to be the Mailbox owner, have been delegate Full Access rights on the Mailbox (eg add-mailboxpermission) or use Impersonation.

How to create an account in outlook programmatically

I wanted to create an account in standalone application like in Outlook.
Have gone through MAPI interfaces Click here! but can't find anything useful.
Also looked for the Account Manager Api Click here!
But here you can only view already added accounts. If you want to create account using Account Manager Api , it will prompt a dialog box for adding an account. Which is of no use for me because I want a code for the same.
Please let me know if there is any solution.
The parts of the IOlkAccount interface related to creating new accounts are not documented. You can use MAPI to add Exchange and PST accounts.
If using Redemption is an option (I am its author), it allows to add POP3/SMTP accounts using RDOAccounts.AddPOP3Account.

Pushing contacts to Users' Phone Contacts (Exchange Server 2007)

We have users in our company that have smart phones (Android/Windows Phone mix)and put their contacts in their Exchange account. It is a unified group of users that just need the phone numbers for each other (with a considerably high turnaround for employees in this position as well). I am looking to get a list of contact names/phone numbers to be automatically pushed to (and updated, if possible) their Exchange contact lists. Previously we have been logging in with their account into a computer, opening Outlook, then loading a csv with the contacts on there. The issue is how time consuming it is, given that amount of turnaround on those users. Thanks in advance!
To create a Contact in a users Mailbox you will need access to that contacts folder in that mailbox so you either need to create a Service Account and give that account rights to the folder via something like Add-MailboxFolderPermission or get the user to delegate the access themselves if they are sensitive to security changes or use EWS impersonation.
Once you have rights to the users Contacts folder then you could automate the process of the CSV import using EWS and Powershell here are a few sample scripts
https://gallery.technet.microsoft.com/scriptcenter/Using-Powershell-to-import-14bef4b8
http://blogs.technet.com/b/bill_long/archive/2010/04/23/importing-public-folder-contacts-from-a-csv-file.aspx
http://gsexdev.blogspot.com.au/2010/04/flexible-exchange-contact-creation.html
Cheers
Glen

Access user accounts in a domain without administrator rights

I am making a very simple marketplace app using the new SDK (Oauth 2.0). One of the steps would be to automatically invite team members for a closed group so I would need access to team members (users in same domain) from the user that is starting the process going through the default "navigator icon in google navigation menu".
This is working fine, however it is only working for administrators (tried with both Directory API and Profiles data API).Is there a way to simply "read" the email from users without needing to have administrator rights? It seems quite an overkill to ask a user to be administrator just for the purpose of being able to invite his team members.
These email addresses are in the user contact list for example, when writing an email they are automatically there so it shoulnt be much of permission problem I guess. can anyone help a bit on how I can accomplish this? Maybe a different API that I have not found?
Very much appreciated,
Best regards,
Joao Garin
You can use "Service Accounts" to access the Directory API on behalf of the Administrator when any user accesses the App.
The Drive API has a really good set of samples here - https://developers.google.com/drive/delegation
This same technique will work with Admin SDK. The end result is the auth is not made on behalf of the user at the keyboard but as an authorized Service Account. This Service Account is authorized by the admin at the time of install.

Resources