Azure Automation - Source Control - Setup Errors

GeorgeD16 6 Reputation points
2020-07-24T14:22:51.723+00:00

From the website i get this when i select authorize.

Azure Repo (git)
The authorization process could not be completed.

my account is a azure global admin, azure repo project admin

from powershell i get this:

New-AzAutomationSourceControl : SourceControl securityToken is invalid.
At line:1 char:1

thoughts?

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

3 answers

Sort by: Most helpful
  1. GeorgeD16 6 Reputation points
    2020-07-24T22:15:52.593+00:00

    it looks like azure automation isn't whitelisted from azure conditional access policies.

    we have a conditional access policy to only allow azure repo login from our datacenter.
    it seems that azure automation isn't allowed to connect to azure repos when this conditional access policy is in place.

    if i disable "Enable Azure Active Directory Conditional Access Policy validation" the source control link works.
    but if i enable it, it immediately breaks.

    moving my case to the conditional access team.

    1 person found this answer helpful.

  2. Dawid Gupta 1 Reputation point
    2022-05-12T10:02:43.117+00:00

    @GeorgeD16 @SwathiDhanwada-MSFT
    I encountered on same issue that CA Policy which we set to control access to ADO was blocking AA repo sync.
    The solution I found was to exclude from CA Policy the account which was used to setup AA git repo synchronization.
    Hope you will find that helpful

    0 comments No comments

  3. Caio Bauab 1 Reputation point
    2025-02-19T18:51:59.2933333+00:00

    Note

    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

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.