Skip to content

Commit

Permalink
Updated NewAdmin.ps1 in Azure Automation.
Browse files Browse the repository at this point in the history
  • Loading branch information
nboettcher committed Mar 30, 2018
1 parent d9201f8 commit 8517c9a
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions NewAdmin.ps1
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
param
(
[parameter(Mandatory=$True)]
[parameter(Mandatory=$false)]
[String]
$tenantId,

[parameter(Mandatory=$True)]
[parameter(Mandatory=$false)]
[String]
$adminEmailAddress,

[parameter(Mandatory=$True)]
[parameter(Mandatory=$false)]
[String]
$adminFirstName,

[parameter(Mandatory=$True)]
[parameter(Mandatory=$false)]
[String]
$adminLastName,

[parameter(Mandatory=$True)]
[parameter(Mandatory=$false)]
[String]
$idp,

[parameter(Mandatory=$True)]
[parameter(Mandatory=$false)]
[String]
$idpUserId
$idpUserId,

[Parameter (Mandatory= $false)]
[object] $WebhookData
)


if ($WebhookData -ne $null) {
$WebhookBody = $WebhookData.RequestBody
$Input = ConvertFrom-Json -InputObject $WebhookBody
$tenantId = $Input.tenantId
$adminEmailAddress = $Input.adminEmailAddress
$adminFirstName = $Input.adminFirstName
$adminLastName = $Input.adminLastName
$idp = $Input.idp
$idpUserId = $Input.idpUserId
}

$adminName = $adminFirstName + ' ' + $adminLastName

$sqlCredential = Get-AutomationPSCredential -Name 'SQLCredentials'
Expand Down

0 comments on commit 8517c9a

Please sign in to comment.