Skip to content

Instantly share code, notes, and snippets.

@Jaykul
Created May 19, 2017 17:13
Show Gist options
  • Save Jaykul/6209378b68a4ea78efd78599cd03ea84 to your computer and use it in GitHub Desktop.
Save Jaykul/6209378b68a4ea78efd78599cd03ea84 to your computer and use it in GitHub Desktop.
$url = "https://octopus.jaykul.com"
# Create our App registration
$Application = @{
DisplayName = $DisplayName
IdentifierUris = $Url
Homepage = "$url/app"
ReplyUrls = "$url", "$url/app/users/authenticatedToken/AzureAD"
LogoutUrl = "$url/app#/users/sign-out"
AppRoles = @(
@{
AllowedMemberTypes = "User"
Description = "Deployers"
DisplayName = "Deployers"
Id = [Guid]::NewGuid().Guid # E.g. "0175be75-79fa-496c-b6e6-3822a3cc73ec"
IsEnabled = $true
Value = "octopusDeployer"
}, @{
AllowedMemberTypes = "User"
Description = "Octopus Users: View-Only access"
DisplayName = "Octopus Viewers"
Id = [Guid]::NewGuid().Guid
IsEnabled = $true
Value = "octopusViewer"
}, @{
AllowedMemberTypes = "User"
Description = "Octopus Administrators"
DisplayName = "Octopus Administrators"
Id = [Guid]::NewGuid().Guid
IsEnabled = $true
Value = "octopusAdmins"
}
)
}
New-AzureADApplication @Production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment