1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. ApplicationRedirectUris
Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi

azuread.ApplicationRedirectUris

Explore with Pulumi AI

azuread logo
Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuread from "@pulumi/azuread";
    
    const example = new azuread.ApplicationRegistration("example", {displayName: "example"});
    const examplePublic = new azuread.ApplicationRedirectUris("example_public", {
        applicationId: example.id,
        type: "PublicClient",
        redirectUris: [
            "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",
        ],
    });
    const exampleSpa = new azuread.ApplicationRedirectUris("example_spa", {
        applicationId: example.id,
        type: "SPA",
        redirectUris: [
            "https://mobile.hashitown.com/",
            "https://beta.hashitown.com/",
        ],
    });
    const exampleWeb = new azuread.ApplicationRedirectUris("example_web", {
        applicationId: example.id,
        type: "Web",
        redirectUris: [
            "https://app.hashitown.com/",
            "https://classic.hashitown.com/",
            "urn:ietf:wg:oauth:2.0:oob",
        ],
    });
    
    import pulumi
    import pulumi_azuread as azuread
    
    example = azuread.ApplicationRegistration("example", display_name="example")
    example_public = azuread.ApplicationRedirectUris("example_public",
        application_id=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",
        ])
    example_spa = azuread.ApplicationRedirectUris("example_spa",
        application_id=example.id,
        type="SPA",
        redirect_uris=[
            "https://mobile.hashitown.com/",
            "https://beta.hashitown.com/",
        ])
    example_web = azuread.ApplicationRedirectUris("example_web",
        application_id=example.id,
        type="Web",
        redirect_uris=[
            "https://app.hashitown.com/",
            "https://classic.hashitown.com/",
            "urn:ietf:wg:oauth:2.0:oob",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := azuread.NewApplicationRegistration(ctx, "example", &azuread.ApplicationRegistrationArgs{
    			DisplayName: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuread.NewApplicationRedirectUris(ctx, "example_public", &azuread.ApplicationRedirectUrisArgs{
    			ApplicationId: example.ID(),
    			Type:          pulumi.String("PublicClient"),
    			RedirectUris: pulumi.StringArray{
    				pulumi.String("myapp://auth"),
    				pulumi.String("sample.mobile.app.bundie.id://auth"),
    				pulumi.String("https://login.microsoftonline.com/common/oauth2/nativeclient"),
    				pulumi.String("https://login.live.com/oauth20_desktop.srf"),
    				pulumi.String("ms-appx-web://Microsoft.AAD.BrokerPlugin/00000000-1111-1111-1111-222222222222"),
    				pulumi.String("urn:ietf:wg:oauth:2.0:foo"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuread.NewApplicationRedirectUris(ctx, "example_spa", &azuread.ApplicationRedirectUrisArgs{
    			ApplicationId: example.ID(),
    			Type:          pulumi.String("SPA"),
    			RedirectUris: pulumi.StringArray{
    				pulumi.String("https://mobile.hashitown.com/"),
    				pulumi.String("https://beta.hashitown.com/"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuread.NewApplicationRedirectUris(ctx, "example_web", &azuread.ApplicationRedirectUrisArgs{
    			ApplicationId: example.ID(),
    			Type:          pulumi.String("Web"),
    			RedirectUris: pulumi.StringArray{
    				pulumi.String("https://app.hashitown.com/"),
    				pulumi.String("https://classic.hashitown.com/"),
    				pulumi.String("urn:ietf:wg:oauth:2.0:oob"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureAD.ApplicationRegistration("example", new()
        {
            DisplayName = "example",
        });
    
        var examplePublic = new AzureAD.ApplicationRedirectUris("example_public", new()
        {
            ApplicationId = example.Id,
            Type = "PublicClient",
            RedirectUris = new[]
            {
                "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",
            },
        });
    
        var exampleSpa = new AzureAD.ApplicationRedirectUris("example_spa", new()
        {
            ApplicationId = example.Id,
            Type = "SPA",
            RedirectUris = new[]
            {
                "https://mobile.hashitown.com/",
                "https://beta.hashitown.com/",
            },
        });
    
        var exampleWeb = new AzureAD.ApplicationRedirectUris("example_web", new()
        {
            ApplicationId = example.Id,
            Type = "Web",
            RedirectUris = new[]
            {
                "https://app.hashitown.com/",
                "https://classic.hashitown.com/",
                "urn:ietf:wg:oauth:2.0:oob",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuread.ApplicationRegistration;
    import com.pulumi.azuread.ApplicationRegistrationArgs;
    import com.pulumi.azuread.ApplicationRedirectUris;
    import com.pulumi.azuread.ApplicationRedirectUrisArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ApplicationRegistration("example", ApplicationRegistrationArgs.builder()        
                .displayName("example")
                .build());
    
            var examplePublic = new ApplicationRedirectUris("examplePublic", ApplicationRedirectUrisArgs.builder()        
                .applicationId(example.id())
                .type("PublicClient")
                .redirectUris(            
                    "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")
                .build());
    
            var exampleSpa = new ApplicationRedirectUris("exampleSpa", ApplicationRedirectUrisArgs.builder()        
                .applicationId(example.id())
                .type("SPA")
                .redirectUris(            
                    "https://mobile.hashitown.com/",
                    "https://beta.hashitown.com/")
                .build());
    
            var exampleWeb = new ApplicationRedirectUris("exampleWeb", ApplicationRedirectUrisArgs.builder()        
                .applicationId(example.id())
                .type("Web")
                .redirectUris(            
                    "https://app.hashitown.com/",
                    "https://classic.hashitown.com/",
                    "urn:ietf:wg:oauth:2.0:oob")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuread:ApplicationRegistration
        properties:
          displayName: example
      examplePublic:
        type: azuread:ApplicationRedirectUris
        name: example_public
        properties:
          applicationId: ${example.id}
          type: PublicClient
          redirectUris:
            - 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
      exampleSpa:
        type: azuread:ApplicationRedirectUris
        name: example_spa
        properties:
          applicationId: ${example.id}
          type: SPA
          redirectUris:
            - https://mobile.hashitown.com/
            - https://beta.hashitown.com/
      exampleWeb:
        type: azuread:ApplicationRedirectUris
        name: example_web
        properties:
          applicationId: ${example.id}
          type: Web
          redirectUris:
            - https://app.hashitown.com/
            - https://classic.hashitown.com/
            - urn:ietf:wg:oauth:2.0:oob
    

    Create ApplicationRedirectUris Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApplicationRedirectUris(name: string, args: ApplicationRedirectUrisArgs, opts?: CustomResourceOptions);
    @overload
    def ApplicationRedirectUris(resource_name: str,
                                args: ApplicationRedirectUrisArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApplicationRedirectUris(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                application_id: Optional[str] = None,
                                redirect_uris: Optional[Sequence[str]] = None,
                                type: Optional[str] = None)
    func NewApplicationRedirectUris(ctx *Context, name string, args ApplicationRedirectUrisArgs, opts ...ResourceOption) (*ApplicationRedirectUris, error)
    public ApplicationRedirectUris(string name, ApplicationRedirectUrisArgs args, CustomResourceOptions? opts = null)
    public ApplicationRedirectUris(String name, ApplicationRedirectUrisArgs args)
    public ApplicationRedirectUris(String name, ApplicationRedirectUrisArgs args, CustomResourceOptions options)
    
    type: azuread:ApplicationRedirectUris
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApplicationRedirectUrisArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ApplicationRedirectUrisArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ApplicationRedirectUrisArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApplicationRedirectUrisArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApplicationRedirectUrisArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var applicationRedirectUrisResource = new AzureAD.ApplicationRedirectUris("applicationRedirectUrisResource", new()
    {
        ApplicationId = "string",
        RedirectUris = new[]
        {
            "string",
        },
        Type = "string",
    });
    
    example, err := azuread.NewApplicationRedirectUris(ctx, "applicationRedirectUrisResource", &azuread.ApplicationRedirectUrisArgs{
    	ApplicationId: pulumi.String("string"),
    	RedirectUris: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    })
    
    var applicationRedirectUrisResource = new ApplicationRedirectUris("applicationRedirectUrisResource", ApplicationRedirectUrisArgs.builder()        
        .applicationId("string")
        .redirectUris("string")
        .type("string")
        .build());
    
    application_redirect_uris_resource = azuread.ApplicationRedirectUris("applicationRedirectUrisResource",
        application_id="string",
        redirect_uris=["string"],
        type="string")
    
    const applicationRedirectUrisResource = new azuread.ApplicationRedirectUris("applicationRedirectUrisResource", {
        applicationId: "string",
        redirectUris: ["string"],
        type: "string",
    });
    
    type: azuread:ApplicationRedirectUris
    properties:
        applicationId: string
        redirectUris:
            - string
        type: string
    

    ApplicationRedirectUris Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ApplicationRedirectUris resource accepts the following input properties:

    ApplicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    RedirectUris List<string>
    A set of redirect URIs to assign to the application.
    Type string
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    ApplicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    RedirectUris []string
    A set of redirect URIs to assign to the application.
    Type string
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    applicationId String
    The resource ID of the application registration. Changing this forces a new resource to be created.
    redirectUris List<String>
    A set of redirect URIs to assign to the application.
    type String
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    applicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    redirectUris string[]
    A set of redirect URIs to assign to the application.
    type string
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    application_id str
    The resource ID of the application registration. Changing this forces a new resource to be created.
    redirect_uris Sequence[str]
    A set of redirect URIs to assign to the application.
    type str
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    applicationId String
    The resource ID of the application registration. Changing this forces a new resource to be created.
    redirectUris List<String>
    A set of redirect URIs to assign to the application.
    type String
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApplicationRedirectUris resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ApplicationRedirectUris Resource

    Get an existing ApplicationRedirectUris resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ApplicationRedirectUrisState, opts?: CustomResourceOptions): ApplicationRedirectUris
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_id: Optional[str] = None,
            redirect_uris: Optional[Sequence[str]] = None,
            type: Optional[str] = None) -> ApplicationRedirectUris
    func GetApplicationRedirectUris(ctx *Context, name string, id IDInput, state *ApplicationRedirectUrisState, opts ...ResourceOption) (*ApplicationRedirectUris, error)
    public static ApplicationRedirectUris Get(string name, Input<string> id, ApplicationRedirectUrisState? state, CustomResourceOptions? opts = null)
    public static ApplicationRedirectUris get(String name, Output<String> id, ApplicationRedirectUrisState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApplicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    RedirectUris List<string>
    A set of redirect URIs to assign to the application.
    Type string
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    ApplicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    RedirectUris []string
    A set of redirect URIs to assign to the application.
    Type string
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    applicationId String
    The resource ID of the application registration. Changing this forces a new resource to be created.
    redirectUris List<String>
    A set of redirect URIs to assign to the application.
    type String
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    applicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    redirectUris string[]
    A set of redirect URIs to assign to the application.
    type string
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    application_id str
    The resource ID of the application registration. Changing this forces a new resource to be created.
    redirect_uris Sequence[str]
    A set of redirect URIs to assign to the application.
    type str
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.
    applicationId String
    The resource ID of the application registration. Changing this forces a new resource to be created.
    redirectUris List<String>
    A set of redirect URIs to assign to the application.
    type String
    The type of redirect URIs to manage. Must be one of: PublicClient, SPA, or Web. Changing this forces a new resource to be created.

    Import

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

    $ pulumi import azuread:index/applicationRedirectUris:ApplicationRedirectUris example /applications/00000000-0000-0000-0000-000000000000/redirectUris/Web
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Active Directory (Azure AD) pulumi/pulumi-azuread
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuread Terraform Provider.
    azuread logo
    Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi