204002 - Unsupported Value in Azure Configuration
Agent error code #204002 indicates that one of the values configured on the Azure NSG knoc cannot be used to build a valid Azure request, so the agent stopped before contacting Azure.
Two things trip the check:
- A value holds a control character (a carriage return, a line feed or a NUL byte). Azure resource names allow none of these, so a value carrying one was not copied cleanly from the portal
- The NSG direction is something other than
InboundorOutbound
A missing subscription is not one of them: the subscription ID is optional, and the agent discovers it from the integration's credentials when it is blank. That discovery fails as #204004 or #204005.
Steps to Resolve
Re-enter the Value From the Azure Portal
- In the Knocknoc admin portal, open the knoc and go to its Azure settings
- Copy each name straight from the Azure portal rather than from a document or a chat message, which can carry an invisible line break
- Save the knoc and retry the grant
Copying through a rich-text editor is the usual source of this. A pasted value can end up with a trailing line break that looks identical on screen.
Check the NSG Direction
The direction has to be exactly Inbound or Outbound, matched without regard to case. Anything else is rejected before the agent contacts Azure.
Confirm the Names Against Azure
az network nsg show --resource-group <resource-group> --name <nsg-name> --query name -o tsv
If that command works with the names you typed by hand but the knoc still fails, the stored value differs from what you typed and needs re-entering.