Saturday, February 25, 2012

AMO: Role Member not existing in Active Directory

Hi,

I have a function in VB.Net that checks if role member is existing in Role. It's doing well, however, if role member is not existing in Active Directory it would prompt me this error during role update:

No mapping between account names and security IDs was done.

So, i provided an on error-resume-next error handler just for it to ignore the error. However, in the succeeding loops, eventhough the role member is existing in AD and not existing in Role, it's prompting me the same error each time it does a Role Update.

Was the error cached the first time? How do I manage this situation well?

cherriesh

Are you saying the user account did exist in AD, was added to your SSAS role, and then removed from AD which gives you the initial error? If so, was the user account disabled in AD or dropped from AD?

B.

|||

Hi,

the domain name is maintained in a specific table in the database which the user had keyed in. I access this table to add the domain name in my SSAS role. However, if the domain name is not really a real one or was entered with typo error, the SSAS will prompt an error at Role1.Update() command since the account entered has no match in AD. If i resume-next on this error, in the succeeding role update, it will prompt me the same error.

cherrie

|||

One of my guys ran into a similar issue on an AMO script. Here is the code he used in the script to resolve the problem:

Code Snippet

Try
currentRole.Members.Add(New RoleMember(RTrim(LTrim(dr(1).ToString))))
currentRole.Update()
Catch ex As Exception
currentRole.Refresh()
End Try

Hope that helps,

B.

No comments:

Post a Comment