Skip to content

Commit 2e78061

Browse files
committed
Fixing task 1704211
1 parent c8370ef commit 2e78061

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

articles/automation/troubleshoot/runbooks.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,20 @@ To determine what's wrong, take the following steps:
363363
}
364364
```
365365

366+
## <a name="object-reference-not-set"></a>Scenario: Incorrect object reference on call to Add-AzAccount
367+
368+
### Issue
369+
370+
You receive this error when working with `Add-AzAccount`, which is an alias for the `Connect-AzAccount` cmdlet:
371+
372+
```error
373+
Add-AzAccount : Object reference not set to an instance of an object
374+
```
375+
376+
### Cause
377+
378+
This error can occur if the runbook doesn't do the proper steps before calling `Add-AzAccount` to add the Automation account. An example of one of the necessary steps is signing in with a Run As account. For the correct operations to use in your runbook, see [Runbook execution in Azure Automation](https://docs.microsoft.com/en-us/azure/automation/automation-runbook-execution).
379+
366380
## <a name="child-runbook-object"></a>Scenario: Object reference not set to an instance of an object
367381

368382
### Issue

0 commit comments

Comments
 (0)