1
votes

When creating a new application in Azure from PowerShell using the command New-AzureADApplication, how can I set the redirect URIs if the application is a spa or publicClient, without using the Azure portal?

1

1 Answers

2
votes

You can do this by using the Azure CLI (or other tool able to make rest requests) and making a PATCH-request to Microsoft Graph to update that specific part of the application manifest:

az rest `
    --method PATCH `
    --uri 'https://graph.microsoft.com/v1.0/applications/{id}' `
    --headers 'Content-Type=application/json' `
    --body "{spa:{redirectUris:['http://localhost:3000']}}"

Microsoft Docs about az rest