I am getting exception when trying to set reply url in service prinicipal. its throwing exception.
 
"Unable to complete this action. Try again later"
 
List cmdlist = new List();  cmdlist.Add("$sp = Get-MsolServicePrincipal -AppPrincipalId  \"" + AppPrincipalId + "\""); cmdlist.Add("$replyHost = \"" + strReplyURL + "\""); cmdlist.Add("$replyUrl = New-MsolServicePrincipalAddresses –Address $replyHost"); cmdlist.Add("Set-MsolServicePrincipal -ObjectId $sp.objectid -Addresses $replyUrl"); //getting exception here

How to fix this issue?I don't have even basic knowledge on powershell. Is there any thing need to change in PowerShell command?