How to add application to Azure AD programmatically?

前端 未结 4 1818
走了就别回头了
走了就别回头了 2020-11-30 04:58

I want to automate the creation of my application in Azure AD and get back the client id generated by Azure AD.

Are there PowerShell commandlets to do this? Is there

4条回答
  •  孤街浪徒
    2020-11-30 05:09

    I've written some powershell scripts which will

    • Create AAD applications (thanks mainly to Matt's answer)
    • Create a Key Vault in Azure
    • Create a key in the Key Vault
    • Assign permissions to the key vault for the AAD applications

    I know this is more than what you're asking for, but if, like me, you're interested in getting back the secret (aka key) from the application (the same one you add in the portal which you have to copy before never seeing it again), then the second script will allow you to explicitly send that in as part of the payload in a call to the Graph API. The script will save that to a file for you to refer to later.

    The other scripts are not really what you're asking about, but you may still find them useful if you ever need to set up SQL Server to work with Azure Key Vault for TDE or column-level encryption.

提交回复
热议问题