SCCM Orchestrator Runbook with SharePoint Online Integration stops as soon as it is started

Emma 11 Reputation points
2022-05-25T13:48:23.213+00:00

I have created a basic runbook to lookup a Sharepoint online list filtering on a status, and then update the item with a new status but as as soon as the runbook is started, it stops with the below error. The connection / integration is working as the task pulls down content from the site and shows the list fields etc. Other runbooks on the same server (not using Sharepoint Online) are working fine and so the services etc are all running.

An error occurred while sending the request.

Exception: HttpRequestException
Target site: TaskAwaiter.ThrowForNonSuccess

Stack trace:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Platforms.net45.Http.DnsSensitiveClientHandler.<SendAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Http.HttpManager.<ExecuteAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Http.HttpManager.<ExecuteWithRetryAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Http.HttpManager.<SendGetAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.WsTrust.WsTrustWebRequestManager.<GetMexDocumentAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.WsTrust.CommonNonInteractiveHandler.<PerformWsTrustMexExchangeAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.UsernamePasswordRequest.<FetchAssertionFromWsTrustAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.UsernamePasswordRequest.<ExecuteAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<RunAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SystemCenter.IntegrationPack.SharePoint.Service.SharePointService.getAccessToken(IPublicClientApplication app)
at SystemCenter.IntegrationPack.SharePoint.Service.SharePointService.<>c__DisplayClassa.<CreateOAuthContext>b__9(Object sender, WebRequestEventArgs e)
at Microsoft.SharePoint.Client.ClientRuntimeContext.OnExecutingWebRequest(WebRequestEventArgs args)
at Microsoft.SharePoint.Client.ClientContext.GetWebRequestExecutor()
at Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate()
at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at SystemCenter.IntegrationPack.SharePoint.Service.SharePointService.GetListByTitle(String title)
at SystemCenter.IntegrationPack.SharePoint.Domain.ExecuteContext.GetListByTitle(String title)
at SystemCenter.IntegrationPack.SharePoint.Domain.ExecuteContext.WithList(String title)
at SystemCenter.IntegrationPack.SharePoint.Activities.MonitorListItemActivity.Execute(IExecuteContext context)
at SystemCenter.IntegrationPack.SharePoint.Activities.SharePointActivityBase.Execute(IActivityRequest request, IActivityResponse response)

System Center Orchestrator
System Center Orchestrator
A family of System Center products that provide an automation platform for orchestrating and integrating both Microsoft and non-Microsoft IT tools.
229 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,685 questions
{count} votes

1 answer

Sort by: Most helpful
  1. instagb 0 Reputation points
    2023-08-24T14:50:53.84+00:00
    1. Check Credentials and Permissions: Make sure that the credentials used for authentication in your runbook are correct and have appropriate permissions to access the SharePoint Online site and perform the required operations.

    Update SharePoint SDK: Ensure that you are using the latest version of the SharePoint Online SDK or client libraries. Outdated versions of these libraries can sometimes cause compatibility issues with authentication.

    Check Authentication Endpoint: The error stack trace indicates that there might be an issue with the authentication endpoint. Double-check the endpoint URL, and verify that it matches the SharePoint Online authentication endpoint.

    Retry Logic: Consider implementing retry logic in your runbook. Sometimes, transient issues can cause authentication failures. Implementing retry mechanisms with exponential backoff can help mitigate such issues.

    Network and Firewall Settings: Check if there are any network or firewall settings that might be blocking the communication between your runbook and SharePoint Online. Ensure that the necessary ports are open and that the necessary URLs are accessible.

    Token Caching: If you're caching authentication tokens, make sure that the cache is properly managed. Expired or invalid tokens can lead to authentication failures.

    Error Handling and Logging: Implement robust error handling and logging within your runbook. This can help you capture more detailed information about the error and its context, which can be valuable for diagnosing the issue.

    Contact Microsoft Support: If none of the above steps resolves the issue, it might be worthwhile to reach out to Microsoft support. They can provide more specific guidance based on the exact error details and your environment.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.