<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Failing to add end user to access control group via python/zeep in Management</title>
    <link>https://community.cisco.com/t5/management/failing-to-add-end-user-to-access-control-group-via-python-zeep/m-p/4760267#M4002</link>
    <description>&lt;P&gt;Thanks (again). I must be missing something in the syntax because I can't see the difference in the groups between your code and mine, but your works and mine doesn't. Urgh!&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 21:30:01 GMT</pubDate>
    <dc:creator>Elliot Dierksen</dc:creator>
    <dc:date>2023-01-23T21:30:01Z</dc:date>
    <item>
      <title>Failing to add end user to access control group via python/zeep</title>
      <link>https://community.cisco.com/t5/management/failing-to-add-end-user-to-access-control-group-via-python-zeep/m-p/4760228#M3999</link>
      <description>&lt;P&gt;I am trying to add a CUCM end user to an access control group. First I was trying update userUser to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;                            resp = destination_axl.updateUser(
                                **{ 'userid': userid,
                                'homeCluster': 'true',
                                'imAndPresenceEnable': 'true',
                                'primaryExtension': { 'pattern': primary_line['pattern'], 'routePartitionName': primary_line['routePartitionName'], },
                                'lineAppearanceAssociationForPresences': {
                                    lineAppearanceAssociationForPresence: [
                                        {
                                            'laapAssociate': 't',
                                            'laapProductType': dphone['return']['phone']['product'],
                                            'laapDeviceName': dphone['return']['phone']['name'],
                                            'laapDirectory': primary_line['pattern'],
                                            'laapPartition': primary_line['routePartitionName'],
                                            'laapDescription': dphone['return']['phone']['description'],
                                        }
                                    ]
                                },
                                'associatedGroups': {
                                    'userGroup': [
                                        {
                                            'name': 'Standard CTI Enabled',
                                            'userRoles': { 'userRole': [ 'Standard CTI Enabled' ] }
                                        },
                                        {
                                            'name': 'Standard CCM End Users',
                                            'userRoles': { 'userRole': [ 'Standard CCM End Users', 'Standard CCMUSER Administration' ] }
                                        }
                                    ]
                                },
                                }
                                )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Everything updated except for the group. Then I was thinking I needed to use addMembers in updateUserGroup, but I am failing to find the right syntax. I am looking at the AXL Schema Reference, but it isn't clicking. I tried to google some examples as well, but I am striking out there too.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 19:55:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/failing-to-add-end-user-to-access-control-group-via-python-zeep/m-p/4760228#M3999</guid>
      <dc:creator>Elliot Dierksen</dc:creator>
      <dc:date>2023-01-23T19:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Failing to add end user to access control group via python/zeep</title>
      <link>https://community.cisco.com/t5/management/failing-to-add-end-user-to-access-control-group-via-python-zeep/m-p/4760235#M4000</link>
      <description>&lt;P&gt;This is an example of how you do it with XML.&amp;nbsp; I assume you just have to reinterpret this into JSON.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/14.0"&amp;gt;
   &amp;lt;soapenv:Header/&amp;gt;
   &amp;lt;soapenv:Body&amp;gt;
      &amp;lt;ns:updateUserGroup&amp;gt;
         &amp;lt;name&amp;gt;Standard CTI Enabled&amp;lt;/name&amp;gt;
         &amp;lt;addMembers&amp;gt;
            &amp;lt;member&amp;gt;
               &amp;lt;userId&amp;gt;nicholas&amp;lt;/userId&amp;gt;
            &amp;lt;/member&amp;gt;
         &amp;lt;/addMembers&amp;gt;
      &amp;lt;/ns:updateUserGroup&amp;gt;
   &amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 23 Jan 2023 19:57:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/failing-to-add-end-user-to-access-control-group-via-python-zeep/m-p/4760235#M4000</guid>
      <dc:creator>npetrele</dc:creator>
      <dc:date>2023-01-23T19:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Failing to add end user to access control group via python/zeep</title>
      <link>https://community.cisco.com/t5/management/failing-to-add-end-user-to-access-control-group-via-python-zeep/m-p/4760242#M4001</link>
      <description>&lt;P&gt;Not sure I can spot any difference from your code, but I did update this sample to show updating associatedGroups: &lt;A href="https://github.com/CiscoDevNet/axl-python-zeep-samples/blob/master/axl_add_update_User.py" target="_blank"&gt;https://github.com/CiscoDevNet/axl-python-zeep-samples/blob/master/axl_add_update_User.py&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;groups = {
    'userGroup': [
        {
            'name': 'Standard CTI Enabled',
            'userRoles': {
                'userRole': [
                    'Standard CTI Enabled'
                ]
            }
        },
        {
            'name': 'Standard CCM End Users',
            'userRoles': {
                'userRole': [
                    'Standard CCM End Users', 'Standard CCMUSER Administration'
                ]
            }
        }
    ]
}

# Execute the updateUser request
try:
    resp = service.updateUser(
        userid='testEndUser',
        associatedDevices = devices,
        associatedGroups = groups,
        homeCluster=True,
        imAndPresenceEnable=True
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 23 Jan 2023 20:24:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/failing-to-add-end-user-to-access-control-group-via-python-zeep/m-p/4760242#M4001</guid>
      <dc:creator>dstaudt</dc:creator>
      <dc:date>2023-01-23T20:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Failing to add end user to access control group via python/zeep</title>
      <link>https://community.cisco.com/t5/management/failing-to-add-end-user-to-access-control-group-via-python-zeep/m-p/4760267#M4002</link>
      <description>&lt;P&gt;Thanks (again). I must be missing something in the syntax because I can't see the difference in the groups between your code and mine, but your works and mine doesn't. Urgh!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 21:30:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/failing-to-add-end-user-to-access-control-group-via-python-zeep/m-p/4760267#M4002</guid>
      <dc:creator>Elliot Dierksen</dc:creator>
      <dc:date>2023-01-23T21:30:01Z</dc:date>
    </item>
  </channel>
</rss>

