locked
Deploying SharePoint 2013 Provider Hosted App without using Visual Studio RRS feed

  • Question

  • Hei ,

    i want to deploy the sharepoint 2013 app without using visual studio. since we need ClientId, ClientSecret .Can anyone tell how can we update the clientId, clientSecret in AppManifest file if we have just .App file ? Whats the best way to do that ?? or anyone has sample ??

    i have searched alot on google also but didnt found any relevant information that how can we deploy without visual studio . i know we have to create appcatalog etc but unsure about how to update the clientid, client secret.

    Any help would be appreciated

    thanks

    Madi

    Thursday, October 15, 2015 8:36 AM

Answers

  • Hi mirsalman,

    We can update the Client Secret and install Provider hosted app using PowerShell:

    $clientID = "74599670-eb74-4348-9e7a-f9dc07c576a2"
    $appFile = "C:\Temp\MyApp.app"
    $siteCollection = "http://manasbhardwaj.net"
    $appName = "My App"
     
    $web = Get-SPWeb -Identity $siteCollection
     
    $realm = Get-SPAuthenticationRealm -ServiceContext $web.Site;
    $appIdentifier = $clientID  + '@' + $realm;
     
    #Register the App with given ClientId
    Register-SPAppPrincipal -DisplayName $appName -NameIdentifier $appIdentifier -Site $web | Out-Null
     
    $app = Import-SPAppPackage -Path $appFile -Site $siteCollection -Source ObjectModel -Confirm:$false 	
     
    #Install the App
    Install-SPApp -Web $siteCollection -Identity $app	| Out-Null

    More information:

    A PowerShell alternative to SharePoint 2013 AppRegNew.aspx

    Thanks

    Best Regards


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Friday, October 16, 2015 2:52 AM