Is there anyway to extract powershell for steps performed in Azure portal?

Audi86 781 Reputation points
2022-05-13T18:52:13.357+00:00

Hi,
I am just wondering if there is anything out there which give us the powershell code of the steps we performed on Azure portal? for example if I am connecting to Azure and defining a conditional access policies so there is a code which is being generated on back end and I can extract it to use it for automation. Do we have anything available like that?

Regards,

Microsoft Security Microsoft Entra Microsoft Entra ID
Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Cogan 10,812 Reputation points Microsoft Employee Volunteer Moderator
    2022-05-13T22:43:03.197+00:00

    The Azure portal does not use PowerShell, it is call the Azure REST API's directly.
    For Conditional Access you want to be looking at the *-azureadmsconditionalaccesspolicy cmdlets

    1 person found this answer helpful.
    0 comments No comments

  2. JamesTran-MSFT 36,906 Reputation points Microsoft Employee Moderator
    2022-05-16T23:15:17.53+00:00

    @Audi86
    Thank you for your post!

    Adding onto what @Sam Cogan mentioned, almost every operation within the Azure Portal is an Azure REST API request. However, when it comes to your question of - if there's anything you can use to get what steps were performed on Azure, to extract the information and use it for automation, you should be able to leverage Fiddler or the Windows Internet Explorer Developer Tools Network Capture for this.

    Both the Fiddler and IE Developer Tool will help you debug web applications by capturing network traffic. However, in your specific scenario you can capture this network traffic to get your step-by-step list of what actions were performed and what REST API calls were made.

    202543-image.png

    I hope this helps!

    If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    1 person found this answer helpful.

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.