Where to add homepageurl in hash table for new app registration

Hey All, I am currently using this for app registrations, whcih is working. I want to also add a homepagurl attribute, but after some trial and error, I was wondering if someon can help me with where it should go in the hash table?

$web = @{
    RedirectUris = "https://www.google.com"
    ImplicitGrantSettings = @{ EnableIdTokenIssuance = $false }
}

$createAppParams = @{
    DisplayName = "_testappreg1"
    Web = $web
    signinaudience = 'AzureADMyOrg'
    RequiredResourceAccess = @{
        ResourceAppId = "00000003-0000-0000-c000-000000000000"
        ResourceAccess = @(
            @{
                Id = "e1fe6dd8-ba31-4d61-89e7-88639da4683d"
                Type = "Scope"
            }
        )
    }
}

Rich,
Welcome to the forum. :wave:t3:

Before we proceed … could you please go back, edit your question once again and fix the formatting of your code?

When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in PowerShell.org 1 <---- Click :point_up_2:t4: :wink:

( !! Sometimes the preformatted text button hides behind the settings gear symbol. :wink: )

And you may add a little more context to your question. I assume you’re talking about an Azure app registration. And you notice that it is actually working. So you may add the actual command you use.

And BTW: If that’s an existing Id for ResourceAccess you use in your code you may obfuscate it here in the forum. :wink:

1 Like

Thanks. Updated. The ID is a well know guid for a graph api permission, so that is fine.
Thanks,

Rich

Not tested, but looking at the docs, it’s part of the webApplication construct so in your code, it should be passed to the -web parameter:

$web = @{
    RedirectUris = "https://www.google.com"
    ImplicitGrantSettings = @{ EnableIdTokenIssuance = $false }
    HomePageUrl = 'https://myapp/login/login.aspx'
}
2 Likes