Hoping someone can help here. I am a newbie to much of this, but really struggling at the moment.
The overall Flow I am looking to create will connect to Azure Automation and trigger a Runbook, using the "Get job output". I have my Azure Portal subscription, with my Automation Account, and a powershell runbook set up. My user exists as an Administrator in the Azure Portal and is the same user I have used to create the Connection for Flow.
When connecting the Azure Automation Action in the flow it asks for the "Subscription", there is nothing available in the drop down, so Flow is not finding my subscription with this connection(my Azure admin user). When added manually, the Subscription name from my Azure Portal, is not recognised, as no further options are found in the "Resource Group" and the message reads;
"Could not retrieve values. The subscription 'XXXXXXXX' could not be found."
If I try adding the Subscription ID I get the following message in the "Resource Group" drop down;
"Could not retrieve values. The access token is from the wrong issuer 'https://sts.windows.net/f8cdef31-a31e-4b4a-93e4-5f571e91255a/'. It must match the tenant 'https://sts.windows.net/517304f6-174b-4a8a-a8dc-57f11be7a92f/' associated with this subscription. Please use the authority (URL) 'https://login.windows.net/517304f6-174b-4a8a-a8dc-57f11be7a92f' to get the token. Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later."
The IDs stated in the message bear no reflection of my subscription ID. If I try entering my subscription ID to the "https://sts.windows.net/...." I get a 404 page not found error.
I have stripped this right back to a Flow button with text input as a trigger, then my Azure Automation as the action, but I still cannot get this access sorted.
I have spent the last couple of days trying to find a solution with no joy, so any help on this would be greatly appreciated. I have found a few things on authentication, but everything I am trying doesn't seem to make a difference.
Could you please share a screenshot of your flow's configuration?
I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:
I could retrieve the My Azure Subscriptions from the drop down, please check if you have created a connection to Azure Automation connector with a proper Microsoft Azure Account (Office 365 account). Also please check if there are some subscriptions existed in your current Microsoft Azure account which you use to create a connection to Azure Automation connector.
In addition, please consider take a try to clear cache of your browser and re-create a new connection to the Azure Automation connector on your side, then check if the issue is solved.
Thanks for the reply and advice. I still don't seem to be having any joy with this, but I have since gone to my azure portal and set up a logic app that does exactly the same thing and that all works, and connects into SharePoint and Exchange on the other domain, but obviously I am doing this from the other side of the fence, so I am working from my subscription, not trying to access it. But the logic app works and I can trigger that from the SPList create action.
I have a screen shot showing the connection information on the Azure Automation step, but I only get an option to reply in Rich Text format and there is no option to insert an image and paste doesn't work for an image into rtf.
I have my workaround using Logic Apps now, so this is less pressing, but it would be good to know whatI am doing wrong for Flow.
I too face the same challenge. I haven't found any solution online. Trying the second approach "Webhook". In my case, Azure Automation is in a different subscription. http://draith.azurewebsites.net/?p=183
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
Check out the community blog page where you can find valuable learning material from community and product team members!