Home Cireson Uploads
image


IT Monkey will place code here as examples of what Cireson's consulting team has to offer as well as examples for public consumption to benefit the Microsoft System Center community as a whole.

DISCLAIMER

All files and projects located here come as is and without any warranty or support. We will attempt to improve the projects as time goes on based on customer and community demand. Comments and improvements are welcome as well as customization requests. Your use of these Cireson Uploads is subject to our Terms of Use.


Cireson's support team has no information on these projects outside of what you have available and will not provide support for these enhancements, extensions, and scripts.

Dont forget to checkout solutions uploaded by our customers, partners and community members here.

"Get User Roles" Task in the SCSM Console

Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

This is an MPB that once imported gives the ability to administrators to see what Security Roles a user is a member of based on what AD groups they are a member of.

Download here:

https://github.com/justinkwork/GetUserRoles/releases/download/1.0.0.15/JKW.Tasks.User.GetSecurityRoles.mpb

Comments

  • Konstantin_Slavin-BoKonstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭

    This is an awesome addition, I know I'm going to be using this a lot. Thanks!

    Although I get an invalid displayname for some userroles:

    I'm not really sure why, as SMLets return the correct DisplayName, and the implementation there is using the same emg.Security.GetUserRoles() method. Maybe a localization thing?

    It's also not possible to scroll, because the dataGrid is disabled. You could use the IsReadOnly property instead (and maybe apply a style, so the visuals match), so scrolling is still enabled.

    And for some users, I'm getting an object reference exception:

    Date: 15-10-2020 15:02:12
    Application: System Center Service Manager
    Application Version: 10.19.1035.0
    Severity: Error
    Message: Object reference not set to an instance of an object.
    
    System.NullReferenceException: Object reference not set to an instance of an object.
      at Microsoft.EnterpriseManagement.UI.SdkDataAccess.ConsoleTaskHandler.DoTask(IList`1 navigationNodes, NavigationModelNodeTask task, List`1 parameterList)
      at Microsoft.EnterpriseManagement.UI.SdkDataAccess.ConsoleTaskHandler.DoTask(IList`1 navigationNodes, NavigationModelNodeTask task)
      at Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleJobExceptionHandler.ExecuteJob(IComponent component, EventHandler`1 job, Object sender, ConsoleJobEventArgs args)
    

    Would you rather have these as GitHub issues?

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    @Konstantin_Slavin-Bo - Thanks for the feedback! You can do Github issues so I can track them appropriately!

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    I think you're right about localization for the DisplayName of the role. I created a role in another language then switched my console back to English and I didn't have anything at all for that role's name in the grid. However, there wasn't a DisplayName in SMLets either.....

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    I updated this task to account for the null reference error when a user doesn't belong to any roles and changed the grid from disabled to ReadOnly. Here's the new Release: https://github.com/justinkwork/GetUserRoles/releases/tag/v1.0.1.0


    Thanks again @Konstantin_Slavin-Bo for the feedback! I left the role displayname issue open, although I don't believe I'll be able to solve it. I'm happy to entertain any ideas on how to fix it!

Sign In or Register to comment.