Setup

Keeping Reports and Files in SharePoint or Google Drive

Settings, SharePoint & Drive. Off until you switch it on: every report, attestation and file the portal keeps is copied into a folder for each client and engagement, named as you set it, and kept up to date.

9 min read · Updated

Pental can keep a copy of every report, attestation and file the portal holds in your own SharePoint or Google Drive, in a folder for each client and engagement, laid out and named as you choose, and kept up to date as things change. It is off until you switch it on, it runs one way, from the portal to there, and it uses an application of your firm’s own at Microsoft or Google: the one your firm has already set up, or one you set up on the same page in a few minutes.

Switch it on

  1. An administrator opens Settings, then SharePoint & Drive. Its first card has the switch Keep files in step, off to begin with.
  2. Under Where they go, choose SharePoint or Google Drive. Each says which of your applications it uses and whether that application is saved already, or, where you have none, that you set it up below, on the same tab.
  3. Fill in where the files go (below), switch Keep files in step on and press Save changes on the bar that comes up.

Beside the switch, a word or two says how it is going: Off, Choose where, Not saved yet, Finding your site, Sending a number of files, a number not sent, Needs attention or Up to date, with when the last file went. If your portal’s database or your Pental gateway needs its latest update first, the tab says so.

SharePoint

SharePoint is reached with an application in your own Microsoft 365: one you set up for it on this tab (below), otherwise your Microsoft Teams application (Settings, Integrations). Give it three things:

FieldWhat to put
SharePoint siteIts address as your browser shows it on the site, such as https://yourfirm.sharepoint.com/sites/Clients, or its name. Anything after the site’s name, a library or a page, is left off.
Document libraryBlank for the site’s own Documents.
Folder in the libraryMade where it is not there yet; a / makes a folder in a folder. Blank for the library’s top.

Or paste a link to the folder under Paste a link to the folder, and the three are filled in for you: a link copied in SharePoint with Copy link, the address your browser shows on the folder, or the folder’s path on your computer where OneDrive keeps it (C:\Users\you\Your organisation\Site - Library\Folder). A link that does not name its folder is looked up with Microsoft, once SharePoint lets your application in; one pasted before then is looked up again by itself once the access is given. A path names the site but not its address, so the site is found by its name; and because OneDrive names a folder synced on its own as it names a library, where the site has no library of that name the folder of that name in its Documents is used, never made. If the link or path ends in one of your clients’ own folders, as your client folder would name it, that folder is left off: the files go in the folder above it with a folder for each client, and that client’s is used as it is.

Once saved, the tab finds the site and shows where the files will go, with Open and Check again. If SharePoint does not let your application in yet, the tab says it needs access to your SharePoint sites and offers Give access with Microsoft. An administrator of your Microsoft 365 (a Global Administrator or a Privileged Role Administrator) signs in once and accepts, and your portal’s database gives the application that access (Sites.ReadWrite.All) itself, then takes back what the sign-in was allowed. Nothing passes through Pental.

With a Teams application, first add the portal’s own address, which the tab shows with Copy, to that application as a Web redirect URI (Microsoft Entra, App registrations, your Teams application, Authentication), because Microsoft sends the administrator back only to an address the application lists. One set up on this tab lists it already.

Come back from Microsoft’s page without finishing and the tab says what that page most likely said, and what puts it right: AADSTS50011, the application does not list the portal’s address (shown again, with Copy); AADSTS700016, the application ID or directory ID is not the one in Entra; otherwise, an account that is not an administrator signed in.

In Microsoft Entra, on the application’s API permissions page: Add a permission, Microsoft Graph, Application permissions, Sites.ReadWrite.All, Grant admin consent. To reach one site only, give it Sites.Selected with write access to that site instead. Either way, the tab looks again by itself every minute.

An application of your own for SharePoint

With no Teams application, the tab sets one up with you under Your Microsoft application, in a few minutes, with each step linked. With one that SharePoint does not let in yet, set up a separate application for SharePoint, under Give access with Microsoft, does the same, for SharePoint alone.

  1. In Microsoft Entra, App registrations, New registration. Name it after your firm and keep Accounts in this organizational directory only. Under Redirect URI choose Web, paste the portal’s address the tab shows with Copy, and Register.
  2. From the Overview it opens on, copy the Directory (tenant) ID and the Application (client) ID into the tab.
  3. Under Certificates & secrets, New client secret, Add. Copy its Value, not its Secret ID (Microsoft shows the Value once), into Client secret value. Note when it expires: a new one pasted here then puts it right.
  4. Press Save and give access with Microsoft. The tab keeps the application and goes straight on to Microsoft’s page, where an administrator signs in once and accepts, as above.

An ID that is not one, the secret’s ID in place of its Value, or a secret with a space in it is refused at its box, saying why. Once kept, the tab names the application and its directory, when it was saved and by whom, with Change and Remove. Its secret is sealed in your database, as Settings’ other secrets are, never shown again, and moves with your database; leave it blank when you change the IDs to keep it for the same application. Remove goes back to your Teams application, where you have one. Teams links go on as they are.

Google Drive

Google Drive is reached with an OAuth client in your own Google Cloud project, which you set up for it on this tab (below). Then press Connect Google Drive. Google asks once to let the portal make and update its own files in your Drive, and nothing else of it, so the portal reaches only the files it makes. The person who connects owns the folder, and shares it with the team as they would any folder. Folder in Google Drive names the folder made at the top of that account’s own Drive, and Disconnect forgets the connection.

Two things belong on that application’s project in Google Cloud. The Google Drive API has to be switched on: if it is not, the tab says so with Turn on the Drive API, which opens the project’s own page, and looks again when you come back. And the drive.file scope belongs on the consent screen’s Data Access page, or Google may say the application is unverified when you connect.

Keep your Google application published (In production, under Audience) or Internal to your Workspace. While it reads Testing, Google lets the lasting access lapse after seven days, and the copies stop until somebody connects again.

An application of your own for Google Drive

The tab sets one up with you under Your Google application, with each page of Google Cloud linked:

  1. In Google Cloud, Google Auth Platform, Clients, Create client (where Google asks first, give it your firm’s name and a support email). Choose Web application, add the portal’s address the tab shows with Copy under Authorised redirect URIs, then Create, and copy the client ID and the secret, which Google shows only then.
  2. In Audience, choose Internal where your firm uses Google Workspace; otherwise External, then Publish app. In Data access, add the drive.file scope.
  3. Turn on the Google Drive API for the project.
  4. Paste the client ID and secret into the tab and press Save and connect Google Drive. The tab keeps them and goes straight on to Google’s page, and whoever connects owns the folder.

A client ID that does not end in .apps.googleusercontent.com, or the client ID pasted as the secret, is refused at its box. Kept, it is shown, sealed and moved with your database as the Microsoft one is, with Change and Remove. Google Drive is connected with that client alone, so after changing or removing it, connect Google Drive again. Coming back from Google’s page without finishing, the tab says what it most likely said: redirect_uri_mismatch (the address not under Authorised redirect URIs yet; Google can take a few minutes to apply it), org_internal (an account outside your Workspace) or Access blocked (still in Testing, so Publish app).

Folders and names

A folder for each client, one for each engagement in it, and one for each kind of file there, or none: leave a kind’s folder blank and its files go loose in the engagement’s folder. Client folder starts as {client} and Engagement folder as {job_code} {assessment}. Every name is built from tokens; press one and it goes into the box you were last in, where your cursor was.

TokenWhat it becomes
{client}, {client_code}The client’s name, and its code
{job_code}, {assessment}The engagement’s job code, and its name
{type}The kind of test
{year}, {month}, {start}When the engagement starts: the year, the month (01 to 12) and the day as YYYY-MM-DD
{file}, {date}The file’s own name, and the day it was added
{kind}What the file is

Eleven kinds of file can be kept, each switched on or off with its own folder and its own name ({file} to begin with). Reports, attestations, the edited Word report, the files your team adds to an engagement and the files a client uploads are among those on from the start; pictures pasted into findings, each as a file of its own, and a client’s credentials (below) are among those off. Remove a file there when it is deleted here is off unless you switch it on, and then sends the file to the site’s recycle bin, or Drive’s bin.

Beside all this, Preview shows your latest engagements, with a file of each kind, filed as the layout you are typing would file them (or an example engagement, before you have one of your own), and draws them again as you type. A file already sent stays where it went when you change the layout later, and a new version of it goes into that same file there.

A client’s credentials

Credentials from the client is off unless you switch it on. While it is on, each set a client sends under Credentials is copied as a text file anyone can read: whom it is from, the engagement, who sent it and when, what kind it is, each field by the name the portal gives it, each login, the notes, and the names of any files sent with it, which are copied beside it. They go in a Credentials folder in the engagement’s, named by when they were sent, such as Credentials 2026-11-09 1432 Admin portal.txt.

Only sets sent while it is on are copied. Until a set has gone it is kept sealed with the credentials’ own key, for two weeks at most, and not at all once you switch it off; once it has gone, nothing of it is kept in your database but where it went. A set the client removes before your tester collects it goes with it, and one removed after it was copied is left there, or removed there too where you choose Remove a file there when it is deleted here. The client is told, before they send any, that your firm keeps a copy with its own files.

Anyone who can open the folder can read the credentials in it. Keep the folder to the people who should, as you would any shared folder.

Activity

The last card counts the files In step, Waiting, Not sent and Not kept, and says who sends them. Behind a Pental gateway, the gateway sends them itself as soon as they are found, with nobody needing the portal open. On Supabase, they go from the browser of whoever in your team has the portal open, straight to Microsoft or Google. A client’s credentials go from such a browser either way, since a gateway sends only what is in the portal’s storage. Nothing passes through Pental.

A file being sent from this browser shows with a bar. A file not sent is listed in Microsoft’s or Google’s own words, with when it is tried again and Try again; after three failed tries it waits for you. The files sent most recently are listed with where each went and a link to it. Sync now looks through the portal’s files at once and asks again for everything not sent.

What it copies, and what it does not

  • Every report, attestation and file the portal keeps, of the kinds you switch on, and each new version of them.
  • A client’s credentials only while Credentials from the client is on; never avatars, templates or branding.
  • One way only: what is changed, added or removed in SharePoint or Drive is not brought back into the portal, and nothing is removed there unless you choose it.
  • When something stands in the way, the tab says what in words: an application not saved, Drive not connected or its access withdrawn, or an update your database or gateway needs.

The copies are made by your own database and your own side, with your own applications, which is the same arrangement as the rest of your database; Security sets out what Pental’s servers can and cannot reach.


Keep Files Where Your Team Works

Switch it on in Settings, SharePoint & Drive, with a Microsoft or Google application of your firm’s own, set up on the same page if you have none, on a free trial with no card required.

Only need the reporting? Our reporting tool is free and open source, on your own server.


Also Worth Reading

Setup guide

Prefer to watch it?

The whole setup recorded, with chapters you can jump to: your firm's name, your own domain, your own database in any of three places, email from your own address, branding, updating the database on Supabase Cloud, and moving the database if you change your mind.

  • 0:00 · Your name and your firm’s name
  • 0:15 · Custom domain
  • 0:43 · Your own database, three ways
  • +4 more