locked
Analyst emailing from multiple email addresses creates multiple user configs in SCSM RRS feed

  • Question

  • I have an analyst that sometimes sends in incidents from his gmail account. The system keeps creating a second user for him with that email address, and his incidents get split between the two "assigned to" users in all the views. Is there a way to associate two email addresses with one user config so that incidents from either address match up to him and do not create a secondary user?
    Tuesday, October 15, 2013 8:15 PM

Answers

  • He did it in SQL
    Update [ServiceManager].[dbo].[MT_System$Notification$Endpoint]
    Set ChannelName_B4672CDC_4B7C_54C9_F140_274DA6D1B56A = 'SIP'
    where [TargetAddress_F96D8DDF_E33A_40B0_4039_F03C3D292F17] like 'email address%'
    

    • Edited by AudreyPaige Thursday, October 24, 2013 1:16 PM
    • Marked as answer by AudreyPaige Thursday, October 24, 2013 1:16 PM
    Thursday, October 24, 2013 1:11 PM

All replies

  • have you tried to add the gmail email as an additional email to the existing USER CI.

    • log as SM admin, SM Console > Configuration Items > Users , make sure the gmail account is deleted.
    • in the existing Analyst domain user properties (under Configuration Items > Users ), go to 'Notification' tab then add the gmail email@ to that user


    Wednesday, October 16, 2013 5:28 AM
  • I did, but then he started getting notifications at both email addresses.
    Wednesday, October 16, 2013 12:33 PM
  • that's normal, because that user has 2 email addresses.

    I can't understand what you want to achieve, the gmail email address must associate to an 'existing account' or 'new account' which will be auto created

    so it's one of the two:

    • 1 account per email address
    • or, 1 account with 2 email addresses

    Wednesday, October 16, 2013 12:58 PM
  • I want one user so that all of his assigned to items are in his list. I do not want it to create a separate user for his gmail address. He does not want to receive all of the notifications at both email addresses.
    Wednesday, October 16, 2013 1:12 PM
  • so the two above options are not good to you, then this cannot be done in SCSM.

    but you may able to do that thru the SMTP server, for example: 1 account with 2 email addresses in SCSM & in SMTP: block the SM return email address to send email to gmail account.

    Wednesday, October 16, 2013 1:24 PM
  • You could try adding the gmail address, then change its channel name to GMAIL instead of SMTP. The out-of-the-box notification engine uses SMTP record's email address to send out emails (so when Service Manager sends notifications, it will still only send them to the SMTP address, not the GMAIL address).

    Note that the email incident creation process might look ONLY for SMTP email address records. (I don't know, I haven't looked). In such a case, changing the Channel Name won't solve your issue (it would still create a new user record if this solution doesn't work)..but it's worth a try :)

    You can't change the channel name in the console, but you can change it using smlets in powershell.

    $mpcEndpoint = get-scsmclass "System.Notification.Endpoint"
    $emoEmail = get-scsmobject -class $mpcEndpoint -filter "Id -eq 'DOMAIN_USERNAME_SMTP'" #Note that this value is the "Name" value in the notification tab of the user form
    set-scsmobject -smobject $emoEmail -PropertyHashTable @{ChannelName="GMAIL"}

    Like the comment says, "DOMAIN_USERNAME_SMTP" is the "name" column for the email address that you just added in the notification tab of the user form (it's actually the Id of the record). It should be something like "MYDOMAIN_JohnSmith_SMTP".

    I can't guarantee this will work for both your scenarios as I haven't tried them myself, so please test them thoroughly (first, make sure that the user's emails from gmail create the incident without creating a new user record and, second, make sure that only the SMTP address receives emails from Service Manager). If it doesn't work, let us know.

    Wednesday, October 16, 2013 1:55 PM
  • The name ended up being whatever I put in, so I called it GMAIL.

    $mpcEndpoint = get-scsmclass "System.Notification.Endpoint"
    $emoEmail = get-scsmobject -class $mpcEndpoint -filter "Id -eq 'GMAIL'" #Note that this value is the "Name" value in the notification tab of the user form
    set-scsmobject -smobject $emoEmail -PropertyHashTable @{ChannelName="GMAIL"}

    My server guy says that he had to change the first part to

    $mpcEndpoint = get-scsmclass -displayName "System.Notification.Endpoint"


    and now it is saying get-SCSMObject is not recognized as the name of a cmdlet.

    • Edited by AudreyPaige Thursday, October 17, 2013 3:33 PM
    Thursday, October 17, 2013 3:33 PM
  • Did you import smlets?

    http://smlets.codeplex.com/

    Thursday, October 17, 2013 4:28 PM
  • Yes, he says he did load them and calls them.
    Tuesday, October 22, 2013 1:42 PM
  • sorry about that! It's not smlets

    import-module <service manager install directory>\Microsoft.EnterpriseManagement.Core.Cmdlets.dll

    Tuesday, October 22, 2013 3:15 PM
  • How does it know which user I am talking about?
    Wednesday, October 23, 2013 1:58 PM
  • Running it with cmdlets, he gets this error:

    The term 'get-scsmobject' is not recognized as the name of a cmdlet, function,
    script file, or operable program. Check the spelling of the name, or if a path
    was included, verify that the path is correct and try again.
    At line:1 char:27
    + $emoEmail = get-scsmobject <<<<  -class $mpcEndpoint -filter "Id -eq 'GMAIL'"
     #Note that this value is the "Name" value in the notification tab of the user
    form
        + CategoryInfo          : ObjectNotFound: (get-scsmobject:String) [], Comm
       andNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

    Wednesday, October 23, 2013 2:11 PM
  • Mistake number 2 on my part..

    The Name column is actually the displayname, not the Id like I originally thought. If you added the address yourself, you'll have to query for the target address..BUT PLEASE be aware that multiple endpoints can have the same target address.

    In your case, I doubt there will be any other end points with your gmail address as a target address, but you should verify that first.

    So, try this:

    import-module smlets
    $mpcEndpoint = get-scsmclass "System.Notification.Endpoint"
    get-scsmobject -class $mpcEndpoint -filter "TargetAddress -eq '<your email address>'"


    You should see only one object returned. It should be the end point you created for your user.

    If only one end point was returned, then do this:

    $emoEmail = get-scsmobject -class $mpcEndpoint -filter "TargetAddress -eq '<your email address>'"
    set-scsmobject -smobject $emoEmail -PropertyHashTable @{ChannelName="GMAIL"}

    To answer your question, the user object is not involved in this..only notification end points. You must uniquely identify the end point you want to modify. As long as there is only one notification end point with your user's gmail as the target address, then that's sufficient.

    Wednesday, October 23, 2013 3:48 PM
  • How can I get the GUID for that name?
    Wednesday, October 23, 2013 6:52 PM
  • query the MT_System$Notification$Endpoint table in the sql database
    Wednesday, October 23, 2013 7:13 PM
  • I don't know why the smlets and cmdlets were not working for us, but he was able to fix it in the database directly. It only allowed the values of SMTP or SIP, so we changed it to SIP. Now I will see if it fixes the notification issue.
    • Edited by AudreyPaige Thursday, October 24, 2013 12:14 PM
    Thursday, October 24, 2013 12:13 PM
  • You should never change anything directly in the database. It is strictly NOT supported by Microsoft.

    The only way things should be changed in the CMDB is by using the SDK (powershell, console, portal, etc).

    Thursday, October 24, 2013 1:05 PM
  • He did it in SQL
    Update [ServiceManager].[dbo].[MT_System$Notification$Endpoint]
    Set ChannelName_B4672CDC_4B7C_54C9_F140_274DA6D1B56A = 'SIP'
    where [TargetAddress_F96D8DDF_E33A_40B0_4039_F03C3D292F17] like 'email address%'
    

    • Edited by AudreyPaige Thursday, October 24, 2013 1:16 PM
    • Marked as answer by AudreyPaige Thursday, October 24, 2013 1:16 PM
    Thursday, October 24, 2013 1:11 PM
  • And like I said, that is strictly NOT supported by Microsoft and can affect the stability of the CMDB.
    Thursday, October 24, 2013 1:24 PM
  • Ok. Not sure why we can seem to get the smlets to work.
    Thursday, October 24, 2013 1:47 PM