<?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: DNAC API - createSNMPv3Credential in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5262021#M8581</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;DNAC version&amp;nbsp;&lt;SPAN&gt;2.3.5.6-70143&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I'm using an USM object that works with the pysnmp library, so I have to translate some of the values to a format that DNAC can understand.&lt;BR /&gt;&lt;BR /&gt;new_cred = [ {&lt;BR /&gt;'authPassword': user_data.authKey,&lt;BR /&gt;'authType': credentials.auth_OID_to_DNAC(user_data.authProtocol),&lt;BR /&gt;'comments': 'imported ' + host,&lt;BR /&gt;'credentialType': 'GLOBAL',&lt;BR /&gt;'description': host,&lt;BR /&gt;'privacyPassword': user_data.privKey,&lt;BR /&gt;'privacyType': credentials.priv_OID_to_DNAC(user_data.privProtocol),&lt;BR /&gt;'snmpMode': 'AUTHPRIV',&lt;BR /&gt;'username': user_data.securityName,&lt;BR /&gt;}, ]&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here is the data I am sending, with sensitive information redacted:&lt;/P&gt;&lt;P&gt;(Pdb) new_cred&lt;BR /&gt;[{'authPassword': '&amp;lt;mumble&amp;gt;', 'authType': 'SHA', 'comments': 'imported for somehostname', 'credentialType': 'GLOBAL', 'description': 'somehostname.somedomain.net', 'privacyPassword': '&amp;lt;mumble&amp;gt;', 'privacyType': 'AES128', 'snmpMode': 'AUTHPRIV', 'username': 'public'}]&lt;/P&gt;&lt;P&gt;(Pdb) l&lt;BR /&gt;78 'privacyType': credentials.priv_OID_to_DNAC(user_data.privProtocol),&lt;BR /&gt;79 'snmpMode': 'AUTHPRIV',&lt;BR /&gt;80 'username': user_data.securityName,&lt;BR /&gt;81 }, ]&lt;BR /&gt;82 create_url = dnac_url + '/dna/intent/api/v1/global-credential/snmpv3'&lt;BR /&gt;83 B-&amp;gt; response = requests.post(create_url,headers=headers, json=new_cred,verify=True)&lt;BR /&gt;84 if response.status_code == 201:&lt;BR /&gt;85 return True&lt;BR /&gt;86 elif response.status_code == 202:&lt;BR /&gt;87 while True:&lt;BR /&gt;88 task_status = requests.get(dnac_url + response.json()['response']['url'], headers=headers, verify=True)&lt;BR /&gt;(Pdb)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The original passwords are a more reasonable length than the word "&amp;lt;mumble&amp;gt;":&lt;/P&gt;&lt;P&gt;(Pdb) len(new_cred[0]['authPassword'])&lt;BR /&gt;34&lt;BR /&gt;(Pdb) len(new_cred[0]['privacyPassword'])&lt;BR /&gt;32&lt;BR /&gt;(Pdb)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 16:56:02 GMT</pubDate>
    <dc:creator>dmcdonald</dc:creator>
    <dc:date>2025-02-18T16:56:02Z</dc:date>
    <item>
      <title>DNAC API - createSNMPv3Credential</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5257810#M8578</link>
      <description>&lt;P&gt;We are hoping to on-board a large number of systems into DNAC.&amp;nbsp; Currently we use unique SNMP credentials per device.&amp;nbsp; Rather than manually enter all of those credentials, I had hoped to pre-populate the credential table using post into&amp;nbsp;&lt;SPAN class=""&gt;/dna/intent/api/v1/global-credential/snmpv3, using the credentials from our existing credential stores.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;However, when I try to create a credential, I get a status of 202.&amp;nbsp; When I look at the status of the task object that is retrieved, it returns a 423 status error code.&amp;nbsp; No credentials show up even after several hours.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Has anyone successfully used the createSNMPv3Credential method and do you have any tips or troubleshooting steps that might make this successful?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Alternatively, has anyone found a way for DNAC to reference cyberark for snmpv3 credentials?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 21:22:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5257810#M8578</guid>
      <dc:creator>dmcdonald</dc:creator>
      <dc:date>2025-02-06T21:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC API - createSNMPv3Credential</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5257975#M8579</link>
      <description>&lt;P&gt;By no means an expert here, looking at the docs, the payload should look like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "snmpV3Credentials": [
    {
      "description": "SNMPv3 Credential for Device MOO",
      "username": "snmpuser",
      "authType": "SHA",
      "authPassword": "authpassword123",
      "privacyType": "AES128",
      "privacyPassword": "privacypassword123",
      "snmpMode": "AUTHPRIV",
      "comments": "Credential for network device MOO",
      "credentialType": "GLOBAL"
    }
  ]
}&lt;/LI-CODE&gt;
&lt;P&gt;Its odd you get the 403 (locked out) message. Can you share your code here, DNAC version etc?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what i read, Cat Centre (DNAC)&lt;SPAN&gt;&amp;nbsp;does not natively integrate with CyberArk for retrieving SNMPv3 credentials, you would need to create&lt;/SPAN&gt;&amp;nbsp;a script/app that would retrieve your SNMPv3 credentials from CyberArk and then uses the Cat Centre API to create the credentials.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2025 11:13:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5257975#M8579</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2025-02-07T11:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC API - createSNMPv3Credential</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5258660#M8580</link>
      <description>&lt;P&gt;Can you post the Cat-C version and a request body you tried? I just tested this minimal request body on 2.3.7.7 with success:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[
    {
        "snmpMode": "NOAUTHNOPRIV",
        "username": "userName"
    }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;There is no Cat-C &amp;lt;-&amp;gt; Cyberark integration unfortunately.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 10:24:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5258660#M8580</guid>
      <dc:creator>Torbjørn</dc:creator>
      <dc:date>2025-02-10T10:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC API - createSNMPv3Credential</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5262021#M8581</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;DNAC version&amp;nbsp;&lt;SPAN&gt;2.3.5.6-70143&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I'm using an USM object that works with the pysnmp library, so I have to translate some of the values to a format that DNAC can understand.&lt;BR /&gt;&lt;BR /&gt;new_cred = [ {&lt;BR /&gt;'authPassword': user_data.authKey,&lt;BR /&gt;'authType': credentials.auth_OID_to_DNAC(user_data.authProtocol),&lt;BR /&gt;'comments': 'imported ' + host,&lt;BR /&gt;'credentialType': 'GLOBAL',&lt;BR /&gt;'description': host,&lt;BR /&gt;'privacyPassword': user_data.privKey,&lt;BR /&gt;'privacyType': credentials.priv_OID_to_DNAC(user_data.privProtocol),&lt;BR /&gt;'snmpMode': 'AUTHPRIV',&lt;BR /&gt;'username': user_data.securityName,&lt;BR /&gt;}, ]&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here is the data I am sending, with sensitive information redacted:&lt;/P&gt;&lt;P&gt;(Pdb) new_cred&lt;BR /&gt;[{'authPassword': '&amp;lt;mumble&amp;gt;', 'authType': 'SHA', 'comments': 'imported for somehostname', 'credentialType': 'GLOBAL', 'description': 'somehostname.somedomain.net', 'privacyPassword': '&amp;lt;mumble&amp;gt;', 'privacyType': 'AES128', 'snmpMode': 'AUTHPRIV', 'username': 'public'}]&lt;/P&gt;&lt;P&gt;(Pdb) l&lt;BR /&gt;78 'privacyType': credentials.priv_OID_to_DNAC(user_data.privProtocol),&lt;BR /&gt;79 'snmpMode': 'AUTHPRIV',&lt;BR /&gt;80 'username': user_data.securityName,&lt;BR /&gt;81 }, ]&lt;BR /&gt;82 create_url = dnac_url + '/dna/intent/api/v1/global-credential/snmpv3'&lt;BR /&gt;83 B-&amp;gt; response = requests.post(create_url,headers=headers, json=new_cred,verify=True)&lt;BR /&gt;84 if response.status_code == 201:&lt;BR /&gt;85 return True&lt;BR /&gt;86 elif response.status_code == 202:&lt;BR /&gt;87 while True:&lt;BR /&gt;88 task_status = requests.get(dnac_url + response.json()['response']['url'], headers=headers, verify=True)&lt;BR /&gt;(Pdb)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The original passwords are a more reasonable length than the word "&amp;lt;mumble&amp;gt;":&lt;/P&gt;&lt;P&gt;(Pdb) len(new_cred[0]['authPassword'])&lt;BR /&gt;34&lt;BR /&gt;(Pdb) len(new_cred[0]['privacyPassword'])&lt;BR /&gt;32&lt;BR /&gt;(Pdb)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 16:56:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5262021#M8581</guid>
      <dc:creator>dmcdonald</dc:creator>
      <dc:date>2025-02-18T16:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC API - createSNMPv3Credential</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5268381#M8582</link>
      <description>&lt;P&gt;It sounds to me like you are trying to create a credential set in the network settings and then apply it to the device. The credentials in the network settings are more for using standard configurations at a site or globally. you do not need to save any of your device credentials in the global network settings. This just makes it easier for people who use a limited set of credentials to manage them via Catalyst center.&lt;/P&gt;&lt;P&gt;The solution you are looking for is probably to set the "Update Device Details" API call. A PUT to '&lt;SPAN&gt;&lt;SPAN class=""&gt;/network-device&lt;/SPAN&gt;&lt;/SPAN&gt;'&lt;/P&gt;&lt;P&gt;The sample of the PUT body is below and as you can see, the SNMP settings are listed. You should be able to remove any of the optional settings that you are not updating. The IP of the device is the only required field. Many fields also have the option of using the string '&lt;SPAN class=""&gt;NO!$DATA!$' if they do not require an update. This should allow you to set set the SNMP credentials per-device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"cliTransport": "string",&lt;BR /&gt;"computeDevice": "boolean",&lt;BR /&gt;"enablePassword": "string",&lt;BR /&gt;"extendedDiscoveryInfo": "string",&lt;BR /&gt;"httpPassword": "string",&lt;BR /&gt;"httpPort": "string",&lt;BR /&gt;"httpSecure": "boolean",&lt;BR /&gt;"httpUserName": "string",&lt;BR /&gt;"ipAddress": [&lt;BR /&gt;"string"&lt;BR /&gt;],&lt;BR /&gt;"merakiOrgId": [&lt;BR /&gt;"string"&lt;BR /&gt;],&lt;BR /&gt;"netconfPort": "string",&lt;BR /&gt;"password": "string",&lt;BR /&gt;"serialNumber": "string",&lt;BR /&gt;"snmpAuthPassphrase": "string",&lt;BR /&gt;"snmpAuthProtocol": "string",&lt;BR /&gt;"snmpMode": "string",&lt;BR /&gt;"snmpPrivPassphrase": "string",&lt;BR /&gt;"snmpPrivProtocol": "string",&lt;BR /&gt;"snmpROCommunity": "string",&lt;BR /&gt;"snmpRWCommunity": "string",&lt;BR /&gt;"snmpRetry": "integer",&lt;BR /&gt;"snmpTimeout": "integer",&lt;BR /&gt;"snmpUserName": "string",&lt;BR /&gt;"snmpVersion": "string",&lt;BR /&gt;"type": "string",&lt;BR /&gt;"updateMgmtIPaddressList": [&lt;BR /&gt;{&lt;BR /&gt;"existMgmtIpAddress": "string",&lt;BR /&gt;"newMgmtIpAddress": "string"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"userName": "string"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;On a side note. If you want to integrate with something like cyber ark, I would recommend having cyber ark push the credential updates to a Flask server and then having the Flask server manage your Cat-C integration.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 19:09:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5268381#M8582</guid>
      <dc:creator>john-p</dc:creator>
      <dc:date>2025-03-06T19:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: DNAC API - createSNMPv3Credential</title>
      <link>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5268582#M8583</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/317184"&gt;@dmcdonald&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Sorry for the late response! I unfortunately missed your reply.&lt;/P&gt;
&lt;P&gt;Your payload works if you replace all single quotes with double quotes. I tested with the following payload:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;[
  {
    "authPassword": "mumblemumble",
    "authType": "SHA",
    "comments": "imported for somehostname",
    "credentialType": "GLOBAL",
    "description": "somehostname.somedomain.net",
    "privacyPassword": "mumblemumble",
    "privacyType": "AES128",
    "snmpMode": "AUTHPRIV",
    "username": "public"
  }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 09:32:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/dnac-api-createsnmpv3credential/m-p/5268582#M8583</guid>
      <dc:creator>Torbjørn</dc:creator>
      <dc:date>2025-03-07T09:32:49Z</dc:date>
    </item>
  </channel>
</rss>

