Srinivas

Srinivas

  • NA
  • 39
  • 1.9k

Error in setting reply url in ServicePrincipal using powersh

Mar 4 2016 2:18 AM

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<string> cmdlist = new List<string>();  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</string></string>

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