[英]How to edit Global Address List office 365 using c#
這是我編輯GAL的代碼,出現錯誤
Message =您沒有足夠的權限對此對象執行此操作。 源= Microsoft Outlook。
無法通過Outlook API管理員用戶進行編輯?
Outlook.Application oApp = new Outlook.Application( );
Outlook.AddressEntry dlEntry = oApp.GetNamespace("MAPI").AddressLists["Global Address List"].AddressEntries["Global Employees"];
Outlook.AddressEntries members = dlEntry.Members;
foreach (Outlook.AddressEntry member in members)
{
MessageBox.Show(member.Name + ":" + member.Address + ":" + member.GetExchangeUser().JobTitle);
member.Name = member.Name + " Edited";
member.GetExchangeUser().JobTitle = member.GetExchangeUser().JobTitle + " Edited";;
member.Update();
}
GAL(全局地址列表)是從Active Directory元素生成的。 因此,您需要編輯不間斷的活動目錄,而不是直接編輯GAL。 就您使用Exchange Online(Office 365的一部分)而言,它是底層的Azure Active Directory。
如果使用DirSync / Azure AD Connect,則還可以更新本地Active Directory環境中的內容,以便將其與Azure Active Directory同步。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.