An error occurred while creating the source control named 'devops'. Error details:SourceControl securityToken is invalid..

learner 1 Reputation point
2022-04-15T01:41:13.383+00:00

I'm trying add Azure Devops repo for Runbook sync into Azure Automation Accounts. I followed steps in this guide: https://learn.microsoft.com/en-us/azure/automation/source-control-integration
System managed identity has required role assigned. After supplying values for the 'Source Control' +Add form Authentication successful but finally it fails with message:
'SourceControls securityToken in invalid'. Picture is attached. Please, help me if you have already encountered this problem and how did you resolve it?193277-screen-shot-2022-04-14-at-82007-pm.png

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,163 questions
{count} votes

2 answers

Sort by: Most helpful
  1. tbgangav-MSFT 10,411 Reputation points
    2022-07-11T13:50:16.493+00:00

    <<Resurfacing or summarizing the information shared over comments section, so it helps broader community users.>>

    Thanks to @Chris Hill for providing insights around the error "SourceControl securityToken is invalid". As per this Azure docs github issue, this Azure document is now updated with the details around the same i.e.,

    According to this Azure DevOps documentation, "Third-party application access via OAuth" policy is defaulted to "off" for all new organizations. So if you try to configure source control in Azure Automation with "Azure Devops (Git)" as source control type without enabling "Third-party application access via OAuth" under Policies tile of Organization Settings in Azure DevOps then you might get "SourceControl securityToken is invalid" error. Hence to avoid this error, make sure you first enable "Third-party application access via OAuth" under Policies tile of Organization Settings in Azure DevOps.

    0 comments No comments

  2. Neeraj 11 Reputation points
    2023-01-31T03:16:33.91+00:00

    It still is an issue and gives the same error even after enabling the 'Third-party application access via OAuth' option under Application connection policies.