Search Engine: Elastic

Article ID: 134413, created on Jun 27, 2019, last review on Jun 27, 2019

  • Applies to:
  • Operations Automation 7.1
  • Operations Automation 6.0

Symptoms

Task to provision Azure fails with the error:

Service Creation Failed: Operation Automation service was not created. Task "Provisioning "Tenant" for APS application Azure Cloud Solution Provider" (id = 68728603) is failed with error: "APS Application Error:
500 Internal Server Error
[unknown] Provisioning: resource 18cd3b3a-0a08-4450-a381-13c7d8f5721b of type 'tenants' (http://www.odin.com/app/azure-csp/tenant/1.1) for APS application 'Azure Cloud Solution Provider-3.0-61': An unexpected error has occurred..
Body: {
"error": "unknown",
"message": "An unexpected error has occurred.",
"category": "unknown",
"context": null,
"http_request": "POST /aps/tenants to '192.168.251.140'"
}</code></pre>

In the logs we can see the following error:

[2016-09-13 13:28:41.5177  72cfe666-3e9c-4f2c-8c7c-e1340e0944f6  19  ERROR] ApplicationsController.GetDomainCandidates finished by exception System.NullReferenceException: Object reference not set to an instance of an object.
[2016-09-13 13:28:41.5177  72cfe666-3e9c-4f2c-8c7c-e1340e0944f6  19  ERROR] System.NullReferenceException: Object reference not set to an instance of an object.
StackTrace:    at Odin.AzureCSP.Crest.Api.GetTenantDomain(String tenantName)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.<DistinctIterator>d__81`1.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Enumerable.<UnionIterator>d__88`1.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Odin.AzureCSP.Model.Application.FindDomainCandidates(ILocalStorage localStorage, Int32 accountId)
   at Odin.AzureCSP.Controllers.ApplicationsController.<>c__DisplayClass33.<GetDomainCandidates>b__32()
   at Odin.AzureCSP.Controllers.AzureApsControllerBase.ExecuteControllerAction(String methodName, Func`1 action, Object[] methodParams)
[2016-09-13 13:28:41.5177  72cfe666-3e9c-4f2c-8c7c-e1340e0944f6  19  DEBUG] <App> Incoming request 'GET https://192.168.251.140/aps/applications/073f05a4-73bf-4841-a97f-df614bce16b6/domain_candidates?account_id=1020556' has been finished: HTTP 500 (InternalServerError)
- headers:
        API-Error-Category: unknown
- body:
{
  "error": "unknown",
  "message": "An unexpected error has occurred.",
  "category": "unknown",
  "context": null

Cause

The cause of the issue is that the secret key configured in Azure instance is invalid and it is required to generate a new one.

C:\PST>curl -E "C:\Program Files (x86)\SWsoft\PEM\APS\certificates\poa.pem" -ksS -X POST  https://login.microsoftonline.com/cobweb365.onmicrosoft.com/oauth2/token?api-version=1.0 -d@data.json

{"error":"invalid_client","error_description":"AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided.\r\nTrace ID: 9a146f0d-e6ba-4de3-ad4a-c0855405c2c1\r\nCorrelation ID: accd351e-4172-4dc7-af87-a8544e8a26f3\r\nTimestamp: 2016-09-14 13:38:03Z","error_codes":[70002,50012],"timestamp":"2016-09-14 13:38:03Z","trace_id":"9a146f0d-e6ba-4de3-ad4a-0855405c2c1","correlation_id":"accd351e-4172-4dc7-af87-a8544e8a26f3"}

Those settings can be found under OA > Applications > Azure > Instance > Configuration tab.

Resolution

Regenerate and configure the secret key as per Creating 'Azure CSP' Application Instance.

5356b422f65bdad1c3e9edca5d74a1ae 8fc71f07abe5b233fea1ae0377cd5e3d 956c448bddc7e1f3585373687602379f 6f1456866eed87488c0f02b298a741c0 8c199f0ee4305da1a577740620df4a51 1941880841f714e458ae4dc3d9f3062d

Email subscription for changes to this article
Save as PDF