azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

New-AzureRmADApplication - identifierUris max length?

Open robplank opened this issue 10 years ago • 6 comments

What is the max length of the identifierUris parameter?

When using a URI value that is 233 characters I get this error

New-AzureRmADApplication : {"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Property identifierUris is invalid."},"values":[{"item":"PropertyName","value":"identifierUris"},{"item":"PropertyErrorCode","value":"GenericError"}]}

robplank avatar Jul 19 '16 17:07 robplank

@shuagarw can you take a look?

markcowl avatar Jul 19 '16 20:07 markcowl

  • @rbacask Hi Rob, Please contact Graph team for this as this error is returned from graph api. Alias - DirectoryGraphD

shuagarw avatar Jul 19 '16 22:07 shuagarw

@shuagarw can you confirm that there is an issue with long values ?

if the error is returned from the Graph API then the cmdlet has an issue that needs to be fixed

Please fix the cmdlet to return a meaningful error message and catch the exception correctly.

robplank avatar Jul 19 '16 22:07 robplank

@rashidqureshi @rbacask for FYI

@robplank - I have sent a mail to graph team to confirm this, will let you know once we get to know. Also, I tried this and got the same error, Error message is not helpful at all. This error is returned from Graph API and is not an issue with cmdlet, as we don't do all the validations that is done on graph side on client side as well. We want to return the error message and exceptions got from graph api to the user to clearly communicate the issue although I fully agree that the error returned from graph side should be meaningful to help user resolve the problem.

shuagarw avatar Jul 20 '16 02:07 shuagarw

@shuagarw if there is a limitation on length why wouldn't you add a validation rule to the cmdlet and stop the execution early before making the call to Graph, with that said I'm okay without adding the validation if the error message clearly describes the issue preventing the execution.

robplank avatar Jul 20 '16 02:07 robplank

@rbacAsk for FYI @robplank - Graph team confirmed that the identifierUri max limit is 120 chars and they filed a task on their side to improve the error message in this case. Thanks for reporting this.

shuagarw avatar Jul 20 '16 23:07 shuagarw