Powershell to create ClientID and Clientsecret required for Register-SPAppPrincipal Command

Register-SPAppPrincipal is used to register App to SharePoint.2 key parameters to it are ClientID and Clientsecret.

Query is how can we generate ClientID and Clientsecret in powershell script ?

September 9th, 2015 8:23pm

Hi,

We can use appregnew.aspx page to generate Client Id, or register an App with a given Client Id and after that installing it in SharePoint.

http://manasbhardwaj.net/powershell-alternative-sharepoint-2013-appregnew-aspx/

Or the following article for your reference:

https://msdn.microsoft.com/en-us/library/office/dn726681%28v=office.15%29.aspx?f=255&MSPPError=-2147217396#sectionSection2

Best Regards,

Dennis

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 5:04am

Thanks dennis. I have gone through above links. These dont  discuss how to generate Client ID using Powershell.

September 10th, 2015 1:29pm

Hi Vipin,

The Client ID is a GUID, we can use the following script to generate it.

$clientID = [guid]::NewGuid().ToString()

http://blogs.technet.com/b/heyscriptingguy/archive/2008/02/27/how-can-i-create-a-guid-using-windows-powershell.aspx

Best Regards,

Dennis

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 9:03pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics