If a Juniper Apstra Device System Agent is configured in Juniper Apstra with a username and password, Juniper Apstra will always use this for authentication for any System Agent job.
However, it is observed that if the Juniper Apstra Device System agent is later associated with a Juniper Apstra System Agent Profile with its own username and password, the local username and password of the Juniper Apstra Device System agent is still not cleared.
This article explains how to clear the local username and password of the agent.
If the Juniper Apstra Device System agent is associated with an Juniper Apstra System Agent Profile with its own username and password later, the local username and password of the Juniper Apstra Device System agent is still not cleared.
Users can use the Apstra-CLI system-agents update-profile command to associate one or more Juniper Apstra Device System Agents and have the local username and password cleared so Juniper Apstra will use the System Agent Profile username and password.
system-agents update-profile
system-agents update-profile --ip {ip address range} --profile {system agent profile} --clear-agent-username-password True
Example
apstra-cli> system-agents update-profile --ip 172.20.200.3-200 --profile 1a8dfa9f-254f-41cd-a679-4e8fca42a0c4 --clear-agent-username-password True Successfully updated agent 172.20.200.9 with given profile Successfully updated agent 172.20.200.7 with given profile Successfully updated agent 172.20.200.6 with given profile Successfully updated agent 172.20.200.8 with given profile apstra-cli>
2026-01-08 AOS-CLI -> Apstra-CLI. The command option is still valid.