Azure LDAP与DirectoryEntry“;“服务器不可操作”;错误C#
我已使用以下教程在windows azure中配置了安全LDAP: 但我得到了“服务器无法运行”错误。我正在尝试使用以下代码:Azure LDAP与DirectoryEntry“;“服务器不可操作”;错误C#,c#,.net,azure,active-directory,azure-active-directory,C#,.net,Azure,Active Directory,Azure Active Directory,我已使用以下教程在windows azure中配置了安全LDAP: 但我得到了“服务器无法运行”错误。我正在尝试使用以下代码: string DomainPath = "LDAP://0.0.0.0:636"; DirectoryEntry searchRoot = new DirectoryEntry(DomainPath, "someone@example.com", "password", AuthenticationTypes.Secure); DirectorySearcher se
string DomainPath = "LDAP://0.0.0.0:636";
DirectoryEntry searchRoot = new DirectoryEntry(DomainPath, "someone@example.com", "password", AuthenticationTypes.Secure);
DirectorySearcher search = new DirectorySearcher(searchRoot);
search.Filter = "(&(objectClass=user)(objectCategory=person))";
search.PropertiesToLoad.Add("samaccountname");
search.PropertiesToLoad.Add("mail");
search.PropertiesToLoad.Add("usergroup");
search.PropertiesToLoad.Add("displayname");//first name
SearchResult result;
SearchResultCollection resultCol = search.FindAll();
if (resultCol != null)
{
for (int counter = 0; counter < resultCol.Count; counter++)
{
string UserNameEmailString = string.Empty;
result = resultCol[counter];
if (result.Properties.Contains("samaccountname") && result.Properties.Contains("mail") &&
result.Properties.Contains("displayname"))
{
Users objSurveyUsers = new Users();
objSurveyUsers.Email = (String)result.Properties["mail"][0] +
"^" + (String)result.Properties["displayname"][0];
objSurveyUsers.UserName = (String)result.Properties["samaccountname"][0];
objSurveyUsers.DisplayName = (String)result.Properties["displayname"][0];
lstADUsers.Add(objSurveyUsers);
}
}
}
string DomainPath=“LDAP://0.0.0.0:636”;
DirectoryEntry searchRoot=新的DirectoryEntry(域路径,“someone@example.com,“密码”,AuthenticationTypes.Secure);
DirectorySearcher search=新的DirectorySearcher(searchRoot);
search.Filter=“(&(objectClass=user)(objectCategory=person))”;
search.PropertiesToLoad.Add(“samaccountname”);
search.PropertiesToLoad.Add(“邮件”);
search.PropertiesToLoad.Add(“用户组”);
search.PropertiesToLoad.Add(“displayname”)//名字
搜索结果;
SearchResultCollection resultCol=search.FindAll();
if(resultCol!=null)
{
对于(int计数器=0;计数器
我还尝试在ldp.exe软件中连接我的Ip和域。连接失败也会出现错误
我的问题是,我可以在azure平台中使用DirectoryEntry获取用户吗
如果不是这样,Azure中LDAP的用途是什么
提前感谢Azure上的,从Azure广告中获取用户的最佳做法是使用Azure广告图API,请参考了解 使用AAD图形API有两种方法,包括&
作为参考,有一篇文章介绍了如何对使用Graph API的用户执行操作,并提供了不同编程语言的示例代码,请参见。在Azure上,从Azure AD获取用户的最佳实践方法是使用Azure AD Graph API,请参阅了解 使用AAD图形API有两种方法,包括&
作为参考,有一篇文章介绍了如何使用Graph API对用户进行操作,并提供了不同编程语言的示例代码,请参见。您是否解决了此问题?我也有同样的问题。如果你解决了问题,请与我分享信息。Azure中LDAP的用途是什么?问题解决了吗?我也有同样的问题。如果你解决了问题,请与我分享信息。在Azure中使用LDAP的目的是什么?试着回答这个问题,可能有很多原因让你想使用LDAP,比如不想重写复杂的软件。如果你不知道问题的答案,那就不要回答。这应该是一条评论,因为它没有试图回答这个问题。Azure中的LDAPS访问权限不是Azure AD,但对于Azure AD域服务管理域,请参见:尝试回答问题,可能有很多原因导致您希望使用LDAPS,例如不想重写复杂的软件。如果你不知道问题的答案,那就不要回答。这应该是一条评论,因为它没有试图回答问题。Azure中的LDAPS访问权限不是Azure AD,而是Azure AD域服务管理的域,请参见以下内容: