Resource: azuread_application_redirect_uris

Manages the redirect URIs for an application registration.

API Permissions

The following API permissions are required in order to use this resource.

When authenticated with a service principal, this resource requires one of the following application roles: Application.ReadWrite.OwnedBy or Application.ReadWrite.All

When authenticated with a user principal, this resource may require one of the following directory roles: Application Administrator or Global Administrator

Example Usage

resource "azuread_application_registration" "example" {
  display_name = "example"
}

resource "azuread_application_redirect_uris" "example_public" {
  application_id = azuread_application_registration.example.id
  type           = "PublicClient"

  redirect_uris = [
    "myapp://auth",
    "sample.mobile.app.bundie.id://auth",
    "https://login.microsoftonline.com/common/oauth2/nativeclient",
    "https://login.live.com/oauth20_desktop.srf",
    "ms-appx-web://Microsoft.AAD.BrokerPlugin/00000000-1111-1111-1111-222222222222",
    "urn:ietf:wg:oauth:2.0:foo",
  ]
}

resource "azuread_application_redirect_uris" "example_spa" {
  application_id = azuread_application_registration.example.id
  type           = "SPA"

  redirect_uris = [
    "https://mobile.hashitown.com/",
    "https://beta.hashitown.com/",
  ]
}

resource "azuread_application_redirect_uris" "example_web" {
  application_id = azuread_application_registration.example.id
  type           = "Web"

  redirect_uris = [
    "https://app.hashitown.com/",
    "https://classic.hashitown.com/",
    "urn:ietf:wg:oauth:2.0:oob",
  ]
}

Argument Reference

The following arguments are supported:

Attributes Reference

No additional attributes are exported.

Import

Application API Access can be imported using the object ID of the application and the URI type, in the following format.

terraform import azuread_application_redirect_uris.example /applications/00000000-0000-0000-0000-000000000000/redirectUris/Web