MicrosoftDocs / feedback

📢 docs.microsoft.com site feedback
https://learn.microsoft.com
Creative Commons Attribution 4.0 International
239 stars 160 forks source link

Issue with Url Lists in New-AzureADMSApplication #3767

Open barneschism opened 2 years ago

barneschism commented 2 years ago

Documentation: https://docs.microsoft.com/en-us/powershell/module/azuread/new-azureadmsapplication?view=azureadps-2.0

Describe the bug When attempting to provide multiple RedirectUris for the -Web parameter, receive the following error: [Error] ERROR: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationMessage : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationMessage : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationMessage : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationMessage : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationMicrosoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedOriginInfo : localhostException :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord :Exception :Type : System.Management.Automation.RemoteExceptionSerializedRemoteException : Microsoft.Open.MSGraphV10.Client.ApiException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: Completedat Microsoft.Open.MSGraphV10.Client.Configuration.<>c.<.cctor>b__47_0(String methodName, IRestResponse response) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Client\Configuration.cs:line 194at Microsoft.Open.MSGraphV10.Api.ApplicationApi.NewMSApplicationWithHttpInfo(String authorization, String cmdletName, String clientRequestId, MsApplication msApplication) in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.Client\Api\ApplicationApi.cs:line 2601at Microsoft.Open.MSGraphV10.PowerShell.NewMSApplication.ProcessRecord() in X:\bt\1218881\repo\src\dev\PowerShell.V2\MSGraphV10.PowerShell\MSGraphV10.PowerShell.AutoGen\Api\ApplicationApi.cs:line 1002at System.Management.Automation.CommandProcessor.ProcessRecord()SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfoErrorRecord : …Message : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationMessage : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationMessage : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationMessage : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationMessage : Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedHResult : -2146233087CategoryInfo : NotSpecified: (:) [New-AzureADMSApplication], ApiExceptionFullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.NewMSApplicationException: Error occurred while executing NewMSApplicationCode: PunycodeNotAllowedInUrlMessage: Reply url contains punycode.InnerError:RequestId: c4091297-1696-440a-a1e8-f585bcb96c49DateTimeStamp: Thu, 24 Mar 2022 16:41:54 GMTHttpStatusCode: BadRequestHttpStatusDescription: Bad RequestHttpResponseStatus: CompletedStack:

To Reproduce Steps to reproduce the behavior:

  1. Run the following command: $replyUrls = @("https://login.microsoftonline.com/tenantid/oauth2/v2.0/token", "https://login.microsoftonline.com/tenantid/oauth2/v2.0/authorize"); New-AzureADMSApplication -DisplayName "TestName" -Web @{ RedirectUris = $replyUrls };

Expected behavior Create app registration with multiple redirect URIs (screenshot of expected result below)

Screenshots image

welcome[bot] commented 2 years ago

Thank you for creating the issue! One of our team members will get back to you shortly with additional information. If this is a product issue, please close this and contact the particular product's support instead (see https://support.microsoft.com/allproducts for the list of support websites).