Skip to main content

SharePoint setup guide for ICT

Junipa can show curriculum files and folders that live in your school's SharePoint. Staff pick a file or folder in Junipa, and Junipa opens it from SharePoint each time it is used.

The connection belongs to the school, not to a person. It is an app registration in your own Microsoft Entra tenant with the Microsoft Graph permission Sites.Selected. Nobody signs in to SharePoint through Junipa, and nothing stops working when a staff member leaves.

Your ICT team does the steps on this page once. A Junipa administrator then switches SharePoint on and enters the details under Admin > Settings > SharePoint connection. The same steps are on that page.

What Junipa can and cannot do​

  • Read only. Junipa never creates, changes or deletes anything in SharePoint.
  • Only the sites you grant. Sites.Selected gives access to no sites at all until you grant a site in step 4. Sites you do not grant cannot be seen.
  • Not tied to any user. Junipa signs in as the app, with its own ID and secret.
  • Staff do not need SharePoint access. Staff see a linked file through Junipa. Only staff who can manage curriculum in Junipa can pick new files.
  • A saved copy. Junipa keeps a copy of each linked file so it stays readable if the connection is interrupted.

What you need​

  • A Microsoft 365 account with the Global Administrator role, or the Application Administrator role and someone who can grant admin consent.
  • A SharePoint Administrator (or Global Administrator) account that is a member of each site you want to share, for step 4.
  • About 20 minutes.

Step 1: Register the app​

  1. Open the Microsoft Entra admin centre: entra.microsoft.com
  2. Go to Identity > Applications > App registrations > New registration.
  3. Name: Junipa Resource Connector.
  4. Supported account types: Accounts in this organisational directory only.
  5. Leave Redirect URI empty. Select Register.
  6. On the app's Overview page, copy the Application (client) ID and the Directory (tenant) ID.

Microsoft's guide: Register an application

Step 2: Add the read permission​

  1. In the app, go to API permissions > Add a permission > Microsoft Graph.
  2. Choose Application permissions (not Delegated).
  3. Search for Sites.Selected, tick it, and select Add permissions.
  4. Select Grant admin consent and confirm. The status column shows a green tick.

Remove any other permission listed there, such as User.Read. The app needs only Sites.Selected.

Step 3: Create a client secret​

  1. In the app, go to Certificates & secrets > Client secrets > New client secret.
  2. Description: Junipa. Expires: 24 months.
  3. Copy the secret's Value straight away. It is shown only once.
  4. Note the expiry date.

Step 4: Grant the app read access to each site​

Do this once for each SharePoint site Junipa should see, for example the site that holds your curriculum documents.

Option A: Graph Explorer (nothing to install)​

  1. Open Graph Explorer and sign in with the SharePoint Administrator account from "What you need".

  2. Select Modify permissions, find Sites.FullControl.All and select Consent. This is for your own admin session in Graph Explorer, not for Junipa. Junipa keeps only the read access you grant below.

  3. Find the site's ID. Set the method to GET and run, with your own tenant and site names:

    https://graph.microsoft.com/v1.0/sites/yourschool.sharepoint.com:/sites/Curriculum

    Copy the id value from the response. It looks like yourschool.sharepoint.com,1111...,2222....

  4. Set the method to POST and the address to:

    https://graph.microsoft.com/v1.0/sites/<the id from step 3>/permissions

    Paste this into the request body, with the Application (client) ID from step 1:

    {
    "roles": ["read"],
    "grantedToIdentities": [{
    "application": {
    "id": "<Application (client) ID>",
    "displayName": "Junipa Resource Connector"
    }
    }]
    }

    Run it. A 201 Created response means the grant is in place.

  5. To check, run GET on the same /permissions address. Junipa Resource Connector is listed with the role read.

Microsoft's reference: Create permission on a site

When you have finished, you can remove Graph Explorer's consent under Identity > Applications > Enterprise applications > Graph Explorer.

Option B: PnP PowerShell​

Since 9 September 2024, PnP PowerShell no longer has a shared sign-in app, so you need your own app registration for PnP before Connect-PnPOnline -Interactive will work. If your team already has one:

Connect-PnPOnline -Url https://yourschool.sharepoint.com/sites/Curriculum `
-ClientId "<your PnP sign-in app ID>" -Interactive
Grant-PnPEntraIDAppSitePermission -AppId "<Application (client) ID>" `
-DisplayName "Junipa Resource Connector" `
-Site "https://yourschool.sharepoint.com/sites/Curriculum" `
-Permissions Read

If you do not already use PnP PowerShell, Option A is quicker.

Step 5: Send the values to your Junipa administrator​

Send them securely. Put the secret in a different message or channel from the IDs.

ValueWhere it is
Directory (tenant) IDApp Overview page (step 1)
Application (client) IDApp Overview page (step 1)
Client secret valueStep 3
Secret expiry dateStep 3
The address of each site you grantedStep 4

The administrator enters these under Admin > Settings > SharePoint connection > Connection details, saves, and selects Test connection. Each site shows a tick when its grant is working.

If something goes wrong​

Test connection shows what Microsoft said and how to fix it. If staff hit a problem later, for example when the secret expires, the reason also appears under Connection details and Junipa support is alerted. The code in square brackets is the one to quote if you contact us.

CodeWhat it meansFix
AADSTS7000215 or invalid_clientThe client secret is wrongPaste the secret Value, not the Secret ID (step 3)
AADSTS7000222The client secret has expiredCreate a new secret and send the value and expiry date (step 3)
AADSTS700016The Application (client) ID is not in this tenantCopy it again from the app Overview page (step 1)
AADSTS90002 or AADSTS900023The Directory (tenant) ID is wrongCopy the ID itself, not the school domain (step 1)
AADSTS65001 or AADSTS500011Admin consent for Sites.Selected has not been grantedSelect Grant admin consent (step 2)
site_not_grantedThe app signs in but this site is not grantedRun step 4 for this exact site address
not_found or bad_site_urlMicrosoft cannot find the siteCheck the site address, including the /sites/ part
network or throttledMicrosoft did not answer in timeWait a few minutes and try again

Staff who see an error in the SharePoint picker or viewer get a short message and a reference code. Send that code to your Junipa administrator, or to us.

Removing access later​

  • One site: in Graph Explorer, GET the site's /permissions, copy the permission's id, then DELETE /sites/<site id>/permissions/<permission id>. With PnP: Revoke-PnPEntraIDAppSitePermission.
  • Everything: delete the Junipa Resource Connector app registration, or switch SharePoint off in Junipa.

Renewing the secret​

The secret stops working on its expiry date. Before then, repeat step 3 and send the new value and expiry date to your Junipa administrator, who enters them in Connection details. The site grants stay as they are.