0
votes

I am trying to create Azure AD application using below command but it is throwing exception of type System.Exception

New-AzureRmADApplication -DisplayName SampleADApp -HomePage "http://SampleApplication" -IdentifierUris "http://NewApplication"

I am using Azure Powershell version 3.0 and AzureRM 4.3.1

If I create AAD Application from azure portal then it works fine but again giving same error if I try to create :

New-AzureRMADServicePrincipal

2
Can you execute your script with $DebugPreference="Continue" to produce additional debugging information and include it here?Wayne Yang
Thanks for amazing idea. DebugPreference solve all my problems. I would like mark your comment as accepted answer.arpan desai
Hi, @arpan desai , I'm glad to hear that my comment can help you. I will write it as an answer,then you can mark it to help more people.Wayne Yang

2 Answers

1
votes

You can execute your script with $DebugPreference="Continue"to produce additional debugging information . Then you can get the Error value details and you can resolve this issue through it.

0
votes

The first one might be because IdentifierUris is an array. Try specifying it as:

New-AzureRmADApplication -DisplayName SampleADApp -HomePage "http://SampleApplication" -IdentifierUris @("http://NewApplication")