-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New-AzureADMSApplication GA1.0 and Beta (#273)
* New-AzureADMSApplication GA1.0 * New-AzureADMSApplication Beta * New-AzureADMSApplication refactor: expand additional properties
- Loading branch information
Showing
2 changed files
with
307 additions
and
0 deletions.
There are no files selected for viewing
159 changes: 159 additions & 0 deletions
159
module/AzureAD/customizations/New-AzureADMSApplication.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
# ------------------------------------------------------------------------------ | ||
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. | ||
# ------------------------------------------------------------------------------ | ||
@{ | ||
SourceName = "New-AzureADMSApplication" | ||
TargetName = "New-MgApplication" | ||
Parameters = @( | ||
@{ | ||
SourceName = "AddIns" | ||
TargetName = "AddIns" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "Api" | ||
TargetName = "Api" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
} | ||
@{ | ||
SourceName = "AppRoles" | ||
TargetName = "AppRoles" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$a = @() | ||
$input = $TmpValue | ||
foreach($v in $input) | ||
{ | ||
$Temp = $v | ConvertTo-Json | ||
$hash = @{} | ||
(ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} | ||
$a += $hash | ||
} | ||
$Value = $a | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "InformationalUrl" | ||
TargetName = "Info" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "KeyCredentials" | ||
TargetName = "KeyCredentials" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$a = @() | ||
$input = $TmpValue | ||
foreach($v in $input) | ||
{ | ||
$hash = @{ | ||
CustomKeyIdentifier= $v.CustomKeyIdentifier | ||
EndDateTime = $v.EndDateTime | ||
Key= $v.Key | ||
StartDateTime= $v.StartDateTime | ||
Type= $v.Type | ||
Usage= $v.Usage | ||
} | ||
$a += $hash | ||
} | ||
$Value = $a | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "OptionalClaims" | ||
TargetName = "OptionalClaims" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "ParentalControlSettings" | ||
TargetName = "ParentalControlSettings" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "PasswordCredentials" | ||
TargetName = "PasswordCredentials" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$a = @() | ||
$input = $TmpValue | ||
foreach($v in $input) | ||
{ | ||
$Temp = $v | ConvertTo-Json | ||
$hash = @{} | ||
(ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} | ||
$a += $hash | ||
} | ||
$Value = $a | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "PublicClient" | ||
TargetName = "PublicClient" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "RequiredResourceAccess" | ||
TargetName = "RequiredResourceAccess" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Value = $TmpValue | ConvertTo-Json | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "Web" | ||
TargetName = "Web" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
} | ||
) | ||
outputs = @( | ||
@{ | ||
SourceName = "AdditionalProperties" | ||
TargetName = "AdditionalProperties" | ||
ConversionType = "FlatObject" | ||
SpecialMapping = $null | ||
} | ||
) | ||
CustomScript = $null | ||
} |
148 changes: 148 additions & 0 deletions
148
module/AzureADPreview/customizations/New-AzureADMSApplication.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# ------------------------------------------------------------------------------ | ||
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. | ||
# ------------------------------------------------------------------------------ | ||
@{ | ||
SourceName = "New-AzureADMSApplication" | ||
TargetName = "New-MgBetaApplication" | ||
Parameters = @( | ||
@{ | ||
SourceName = "Api" | ||
TargetName = "Api" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
} | ||
@{ | ||
SourceName = "AppRoles" | ||
TargetName = "AppRoles" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$a = @() | ||
$input = $TmpValue | ||
foreach($v in $input) | ||
{ | ||
$Temp = $v | ConvertTo-Json | ||
$hash = @{} | ||
(ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} | ||
$a += $hash | ||
} | ||
$Value = $a | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "InformationalUrl" | ||
TargetName = "Info" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "KeyCredentials" | ||
TargetName = "KeyCredentials" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$a = @() | ||
$input = $TmpValue | ||
foreach($v in $input) | ||
{ | ||
$hash = @{ | ||
CustomKeyIdentifier= $v.CustomKeyIdentifier | ||
EndDateTime = $v.EndDateTime | ||
Key= $v.Key | ||
StartDateTime= $v.StartDateTime | ||
Type= $v.Type | ||
Usage= $v.Usage | ||
} | ||
$a += $hash | ||
} | ||
$Value = $a | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "OptionalClaims" | ||
TargetName = "OptionalClaims" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "ParentalControlSettings" | ||
TargetName = "ParentalControlSettings" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "PasswordCredentials" | ||
TargetName = "PasswordCredentials" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$a = @() | ||
$input = $TmpValue | ||
foreach($v in $input) | ||
{ | ||
$Temp = $v | ConvertTo-Json | ||
$hash = @{} | ||
(ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} | ||
$a += $hash | ||
} | ||
$Value = $a | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "PublicClient" | ||
TargetName = "PublicClient" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "RequiredResourceAccess" | ||
TargetName = "RequiredResourceAccess" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Value = $TmpValue | ConvertTo-Json | ||
'@ | ||
}, | ||
@{ | ||
SourceName = "Web" | ||
TargetName = "Web" | ||
ConversionType = "ScriptBlock" | ||
SpecialMapping = @' | ||
$Temp = $TmpValue | ConvertTo-Json | ||
$Value = $Temp | ||
'@ | ||
} | ||
) | ||
outputs = @( | ||
@{ | ||
SourceName = "AdditionalProperties" | ||
TargetName = "AdditionalProperties" | ||
ConversionType = "FlatObject" | ||
SpecialMapping = $null | ||
} | ||
) | ||
CustomScript = $null | ||
} |