locked
Tutorial Powershell Runbook fails in US Government Cloud RRS feed

  • Question

  • The Azure-provided tutorial AzureAutomationTutorialScript powershell script works in the main Azure cloud, but fails in the US Government cloud when calling Add-AzureRmAccount with an error "Confidential Client is not supported in Cross Cloud request".



    • Edited by DavidHirsch Tuesday, April 21, 2020 3:12 PM
    Friday, April 17, 2020 12:01 AM

All replies

  • Hi DavidHirsch,

    Are you trying to access the Government cloud from an automation account in the Public cloud, or from an automation account in the Government cloud?

    Can you try adding the -environment:AzureUSGovernment parameter with the Add-AzureRmAccount cmdlet and see if issue gets resolved ?

    Wednesday, April 22, 2020 8:16 AM
  • Hi DavidHirsch, Did you get chance to look at my previous comment? If yes, do you have any update on it?
    Saturday, April 25, 2020 11:54 AM
  • I am trying to access the Government cloud from an Automation account in the Government cloud:

    This is the code provided by Microsoft in the tutorial powershell script:

    Please note that the Environment is already specified in the script.  However, I made the change that you suggested, so that the script reads as follows:

    And now when I test, I get an error:

    Thanks,

    David

    Monday, May 4, 2020 11:58 PM