locked
SCSM Request offering RRS feed

  • Question

  • Hi guys,

    I have a request offering to disable AD users and works just fine, the only problem is that I want for the query results to show me only the enabled user.

    That is possible?

    Thanks 

    Thursday, November 30, 2017 10:57 AM

Answers

  • Hi

    I don't think the disabled state of the user is stored in Service Manager. There does not seem to be a property to hold this information and I do not think the AD connector syncs it.

    One possible solution is to:

    1. Extended the AD User class and add a property eg AccountStatus
    2. Optional: edit the AD User Form to add the new property nor leave it on the Extensions tab
    3. Create a scheduled Powershell script that would "sync" the disabled state for the AD users. This would populate the AccountStatus property on AD user with a value Disabled\Enabled.
      Or if you have other ways of importing data into Service Manager, use them to import the disabled\enabled status 
    4. Create a query that uses the AccountStatus field

    Regards

    Glen


    Web: www.xapity.com  |   Twitter: @xapityapps  |   Facebook: xapityapps


    Thursday, November 30, 2017 7:51 PM
  • Somewhat old, but I would do it this way:

    YOu can use your disable script I would add this:

    Each CI has a AssetStatus provided. So I recommend to use the "Deployed" status for active users and the "Retired" Status for inactive users. Your script has to set the disabled user to "Retired".

    Since I assume you use the AD sync, I would add to this a daily script to set the status, because possibly someone sets the AD user status to disabled without the sr.

    hth

    Thursday, January 18, 2018 10:35 AM

All replies

  • Hi,

    how do you choose who is the user that need to be disabled?
    How is your query result criteria configured?

    Regards,


    Stoyan (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov

    Thursday, November 30, 2017 11:00 AM
  • I don't have a criteria configures that grabs all the AD users from my active directory, the problem is that grabs every users and I don't know if they are already disabled or not. 
    Thursday, November 30, 2017 11:04 AM
  • Hi

    I don't think the disabled state of the user is stored in Service Manager. There does not seem to be a property to hold this information and I do not think the AD connector syncs it.

    One possible solution is to:

    1. Extended the AD User class and add a property eg AccountStatus
    2. Optional: edit the AD User Form to add the new property nor leave it on the Extensions tab
    3. Create a scheduled Powershell script that would "sync" the disabled state for the AD users. This would populate the AccountStatus property on AD user with a value Disabled\Enabled.
      Or if you have other ways of importing data into Service Manager, use them to import the disabled\enabled status 
    4. Create a query that uses the AccountStatus field

    Regards

    Glen


    Web: www.xapity.com  |   Twitter: @xapityapps  |   Facebook: xapityapps


    Thursday, November 30, 2017 7:51 PM
  • Somewhat old, but I would do it this way:

    YOu can use your disable script I would add this:

    Each CI has a AssetStatus provided. So I recommend to use the "Deployed" status for active users and the "Retired" Status for inactive users. Your script has to set the disabled user to "Retired".

    Since I assume you use the AD sync, I would add to this a daily script to set the status, because possibly someone sets the AD user status to disabled without the sr.

    hth

    Thursday, January 18, 2018 10:35 AM