Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Spucelik/SPE-Setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

SPE-Setup

The scripts that I use in this guide can be found in the \assets directory.

A companion video is also available with step by step instructions.

Here is an overview of the creation process

  1. Creat the Azure App Registration
  2. Modify the App Manifest in include this block, replacing what starts on line 72.
	"requiredResourceAccess": [
		{
			"resourceAppId": "00000003-0000-0ff1-ce00-000000000000",
			"resourceAccess": [
				{
					"id": "4d114b1a-3649-4764-9dfb-be1e236ff371",
					"type": "Scope"
				},
				{
					"id": "19766c1b-905b-43af-8756-06526ab42875",
					"type": "Role"
				}
			]
		},
		{
			"resourceAppId": "00000003-0000-0000-c000-000000000000",
			"resourceAccess": [
				{
					"id": "085ca537-6565-41c2-aca7-db852babc212",
					"type": "Scope"
				},
				{
					"id": "40dc41bc-0f7e-42ff-89bd-d9516947e474",
					"type": "Role"
				},
				{
					"id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
					"type": "Scope"
				}
			]
		}
	],
  1. Set the variables we need to run the setup scripts
$TenantName = "<TenantName>"
$TenantID = "<TenantID>"
$AppId = "<AppID>"
$ClientSecret = "<ClientSecret>"
$ContainerTypeName = "ContainerName"
$ContainerName = "SPEVideoDemoContainer"
$ContainerTypeId = "<ContainerTypeID>"
$AzureSubscriptionId = "<AzureSubscriptionID>"
$ResourceGroup = "<ResourceGroup>"
$CertPath = "./certs/SPDemo.key"
$Thumbprint = "Thumbprint"
$AdminUser = "<user>"

  1. Create a new certificate if you don't already have one. Upload it to the App Registration.
 .\createCert.ps1 -CertName $ContainerName

  1. Create the container type.
Import-Module "Microsoft.Online.SharePoint.PowerShell"
Import-Module Microsoft.Online.SharePoint.PowerShell -UseWindowsPowerShell
Connect-SPOService -Url "https://${TenantName}-admin.sharepoint.com"

New-SPOContainerType -ContainerTypeName $ContainerTypeName -OwningApplicationId $AppId

$ContainerTypeId = "<ContainerTypeId>"
  1. Update the ContainerTypeId variable with the PowerShell output.
  2. Associate the Azure Subscription to the newly created Container Type
Add-SPOContainerTypeBilling –ContainerTypeId $ContainerTypeId -AzureSubscriptionId $AzureSubscriptionId -ResourceGroup $ResourceGroup -Region "eastus"

  1. Register the Container Type and create a new Container.
.\SPERegistrationScript.ps1 -ClientId $AppId -ContainerTypeId $ContainerTypeId -PemCertificationFilePath $CertPath -ConsumerTenantId $TenantID -ConsumerTenantUrl "https://${TenantName}.sharepoint.com" -Thumbprint $Thumbprint
.\CreateContainer.ps1 -TenantId $TenantID -ClientId $AppId -ClientSecret $ClientSecret -ContainerTypeId $ContainerTypeId -DisplayName "Container1" -UserPrincipalName "${AdminUser}@${TenantName}.onmicrosoft.com" -Role "owner"

  1. You will now be able to see the newly created Container Type and container in the SharePoint Admin center. It may take up to 5 minutes to appear.
  2. Everything is now configured for you to use SharePoint Embedded in your application.

About

Steps to easily setup a SharePoint Embedded Container Type

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published