Active Directory User Properties Updates?
Jul 22, 2011
I wrote a sub that would update an Active Directory user's phone numbers using the lines below:
SetProperty(dirEntryResults, "telephoneNumber", strPhoneNumber)
SetProperty(dirEntryResults, "mobile", strPhoneMobileNumber)
The telephone number updates successfully but the mobile number never updates although the strPhoneMobileNumber variable has a valid phone number value. The code executes without any errors. What do I need to do to change the mobile number?
Sub UpdateUserAcct(ByVal userLogin As String, ByVal strPhoneNumber As String, ByVal strPhoneMobileNumber as String)
Dim dirUser As DirectoryEntry = GetDirectoryEntry()
Dim dirUserSearcher As DirectorySearcher = New DirectorySearcher(dirUser)
[code]....
View 6 Replies
ADVERTISEMENT
May 4, 2006
I'm trying to obtain the Terminal Services Profile Path for a user using VB.Net and the System.DirectoryServices.DirectorySearcher. I am able to get the user object's first name, last name, city, state, zip, etc. However, there is one property that eludes me. I cannot manage to find a way to get the terminalservicesprofilepath property.This is how I did it in VB6 and it worked perfect:
visual basic code:
Dim TSPath as string
Dim FirstName as string
[code].....
View 5 Replies
Jun 9, 2009
I am developing a web site which is basically used to display the properties and attributes of Active Directory users. When i enter a username it should show that particular users full details including : Login Id, first name, lastname, DN, account lockout status, disabled or not,password expiry etc. That is working fine. I also wanted to include USER ACCOUNT EXPIRY DATE, USER CANNOT CHANGE PASSWORD IS SET OR NOT, USER MUST CHANGE PASSWORD IS SET OR NOT. Kindly help me to add the code for these 3 purposes. Below given os the current code which is used to display other all attributes and properties.
[Code]...
View 3 Replies
Jul 28, 2011
I apologize if this is the wrong forum. I'm searching for all computer objects in an OU in Active Directory. I'm able to get the computer name, DN, and description but cannot get the memberOf properties. I'm wanting to get all groups the computer is a member of. My code is below:
[Code]...
View 2 Replies
Feb 15, 2007
I would like to have all properties on a user from active directory. I find some property name as :
distinguishedName, SAMAccountName, sn, givenName, TelephoneNumber, mail
If you have a list of property? As each user has an ID in AD ?
View 5 Replies
Aug 6, 2010
I am trying to create a VB.NET application which will (hopefully) reduce some time spent on some of my departments helpdesk calls. The part that I am stuck with is how to use VB.NET to remove a user from a group. The following is code that I have been playing with:
[Code]....
I am coding in .NET 2.0 as I am unsure if the server it will live on will have 3.5 installed.
View 1 Replies
Apr 27, 2012
I am trying to add user to a Active Directory group which i already have access to but i am getting an error "Unspecified Error" Ca you guys please take a look at my code and let me know what i am doing worng?
Public Sub adUserToGroup()
Dim Buf As String = ""
Dim sDomainName As String = ("LDAP:servername.cfe.kineeg.com")
[code].....
View 1 Replies
Aug 17, 2010
How to enable a Active Directory User Account By using vb.net CodeSHYAM
View 7 Replies
Feb 15, 2011
I am building a simple intranet site and I want to get the user's Active Directory.What steps do I need to take on the IIS side for this to work?Are any changes required to my web config? detailed explanation, as this is giving me a hard time.I have tryed things like this
Request.LogonUserIdentity.Name.ToString
also
HttpContext.Current.User.Identity.Name
View 1 Replies
May 9, 2006
I'm a developer for a College we have an active directory.I need to query Active Directory with the Pc name and return it's path in the Active Directory tree.
View 3 Replies
Sep 1, 2011
I am a programmer for 6 years with VB6, now I am using VB 10 Express and working with Active Directory for the first time. I have been able to make a lot of things work with AD.I have been trying time and again to make this work. I have been googling and trying samples and keep running into one error after another, the latest is a [code] "There is no such object on the server."[code] My objective for this is to move the user account from the office OU to the Disabled OU. I have been fighting this for so long that I am going crosseyed.[code]
View 1 Replies
Jul 14, 2009
Active Directory User Group Membership
View 4 Replies
Dec 16, 2011
I am using windows 2008 R2 Server and trying to Add a user in active directory .
I am able to save user ID of length less than 20 Characters.But when I am trying to increase this value to 30 characters then I am getting the error.
"System.DirectoryServices.DirectoryServicesCOMException (0x8007001F): A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)"
This error when I searched on net give me various links saying that:
(a)verify if the issue is caused by the length of sAMAccountName
(b)The document of SAM-Account-Name also indicates that the length of it should be less than 20 characters.
I am using the code below to add user in Active Directory
public static void AddUser(ADUser adUser)
{
if (_logger.IsDebugEnabled)
[Code]....
View 3 Replies
Dec 20, 2011
I have multiple web applications that I've built for our intranet. I wanted to allow users to not worry about logging in, so these apps pull the currently logged on user when they hit the site. I used this code for this to happen:
Dim userName As String = User.Identity.Name
CurrentUser = userName.Substring(userName.IndexOf("") + 1)
This works like a charm, no issues here. The next step is to query Active Directory for that logged in user to pull various information. How I currently have it coded, it works like a charm on the devleopment side (typical because I'm not running IIS).The problem becomes when I publish it to my IIS server (Windows Server 2008 R2 running IIS 7.5), I get error messages that point to the specific line in my code that queries Active Directory. The interesting part is these apps were working great last week. They broke after my server admin did the latest batch of Windows Updates (please note, I am running them using .Net Framework 4.0)Before I had each app setup so that Windows Authentication was Enabled, the other Authentication types were disabled. For providers, Negotiate is #1, NTLM is #2. For Advanced Settings, Extended Protection = Off, and Enable Kernel-mode authentication is checked.
[code]...
In doing this I also removed the string that was higher up in my web.config section. This did not work either (fyi, this was a great reference[url]I then tripped across this article: [url] which seemed to be a similar situation. This article eventually referenced "Double Hops", after looking into this and trying a few things, this didn't solve my issue either.Next StepI am going to try a new IIS 7.5 implementation on a different Server 2008 R2 system and essentially start from scratch, to see if the problem recreates or not.
View 2 Replies
Aug 17, 2010
How to change the password of a Active Directory by using VB.net CodeSHYAM
View 3 Replies
Oct 6, 2009
Check the User is the Member of One Group using Active Directory in C#.net[code]..
View 1 Replies
Sep 12, 2011
I am trying to create a VB.NET application that allows a user to copy an Active Directory user or template in order to create a new Active Directory user. Currently a user right clicks on a template and chooses Copy, then enters info for new user.user is then created just like the template user. How can I perform these operations using the VB.NET framework and Active Directory or Account Management DLL's?
View 4 Replies
Jul 6, 2010
I've been searching and trying out code all day.Nothing errors on this code but it doesn't delete any user accounts.[code]...
View 8 Replies
Jun 12, 2011
A fast and universal way to get all the user information on the active directory with export to csv.Don't forget to make a reference to system.directoryServices.
[Code]...
View 1 Replies
Jun 29, 2009
I'm trying to rename a user programically and can't figure out the mailbox piece(proxyAddresses).
[Code]...
View 2 Replies
Apr 7, 2011
I have a web form that uses AD to authenticate users. I want to be able to authenticate users with expired password, and redirect them to the password change page after authentication.
if for instance, a site admin reset a users password, I use the method below, to make the user reset their password on next logon.
Public Shared Sub ForceUserToResetPassword(ByVal LDAP_URI As String, ByVal UserName As String, ByVal Auth_UserName As String, ByVal Auth_Password As String)
Dim LDAPEntry As DirectoryEntry = Nothing
Try
[Code]...
View 3 Replies
Jul 6, 2010
I am using Active Directory to authenticate users for an intranet site. I would like to refine the users that are authenticated based on the group they are in in Active Directory. how to find what groups a user is in in ASP.NET 4.0 (VB)?
View 3 Replies
Mar 8, 2012
how to find out what Active Directory groups a user belongs to? I already have the code finding out their username but now I need to find out what group they belong to so I can assign the relevant photocopier code.
View 1 Replies
Apr 7, 2011
I have a web form that uses AD to authenticate users. I want to be able to authenticate users with expired password, and redirect them to the password change page after authentication. if for instance, a site admin reset a users password, I use the method below, to make the user reset their password on next logon.[code]
View 1 Replies
Apr 28, 2006
1> take a request... ie. First name, Last name, or login ID and Search AD Path can be hard coded so entire forest is not searched.
2> List all entries found
3>once the correct user is selected I need to pull First, last, middle name and , Email , Phone number , @ and GUID for that user.
View 7 Replies
Oct 26, 2011
I am working on a VB.net form, I am trying to connect to Active Directory, with a VB form have the user be able to search for a username and then return if the account is locked or unlock, if the account is locked I want the option to unlock the account based on the credentials of the user that is doing the search.
View 11 Replies
Apr 12, 2012
add a custom field and/or attributes in active directory (whichever their called) for a user. For instance, im wanting to add a field for employee id but can I also get this field to show up in active directory users and computers to see if its working correctly? Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt.
View 5 Replies
Mar 19, 2012
I'm simply trying to create a small tool, to create a username / password / OU group, and a few properties on a new user from a form with a few text boxes, and a button.I know how to connect to LDAP, though i'm having a problem getting this done.
View 3 Replies
Aug 18, 2011
I have a piece of business-soft to make the lives of our employees easier. It's fairly typical, a tabbed-MDI style main form with a load of buttons that activate each of its sub-modules.
I have security set up on it so that someone in sales can't enter the module for purchasing, etc... I authenticate the user by having them type in their network password and check it against the AD server with this function:
'Remember to Imports System.DirectoryServices for this to work
Private Function ValidateActiveDirectoryLogin(ByVal Domain As String, ByVal Username As String, ByVal Password As String) As Boolean
[Code].....
View 22 Replies
Aug 31, 2010
I need to read the distinguished name of the current user (the one running the program) from Active Directory.I'm warm (I know I should use System. DirectoryServices and DirectorySearcher), but somehow I can't get the code to work properly, nor can I find a working example.Now, after having spent hours searching for examples on the internet, I'm getting quite frustrated with myself, so I turn to you hoping someone can provide an example.Why I need this: when people run this program, it needs to detect which OU they belong to. We have several sites (for example Rotterdam and Amsterdam) and depending on what site the user's OU is, I need to perform some actions. So I hope to derive f.e. "OU=Rotterdam" from their DN.
View 3 Replies