Skip to main content

Connect a SharePoint folder to Revizo (for administrators)

This guide is for you if you are an administrator in Revizo and have administrator rights in Microsoft 365, or get help from someone who has. Once a SharePoint folder is connected, everyone in the Revizo organisation can browse it, search it and link files from it. They need no connection of their own and no approval from IT.

:::warning Choosing a folder is an access decision With the level «Read + write in the chosen folder», everyone in the Revizo organisation can browse the folder, search it and link files from it, whatever rights they have in SharePoint. That applies to everyone with the Administrator or Member role. Users with the Viewer role get no SharePoint sources. Opening a file still requires the user to have their own access in SharePoint.

Choose a folder that everyone in the organisation may see. If the folder holds files that should not be shown, choose another folder or a separate site. :::

:::note The setup dialog is in Norwegian The SharePoint setup dialog is shown in Norwegian in the app. Button and field names below are given as they appear, with an English translation in brackets. :::

What Sites.Selected means​

Revizo uses Microsoft's least-privilege model, Sites.Selected:

  • Revizo has no access to SharePoint until a Microsoft administrator has given the app access to one specific site.
  • You choose whether the app gets the role write or the roles read and write on the site. The roles apply to the whole site.
  • Revizo restricts itself to one folder in one document library. The server checks every file and folder against the folder before anything is read. Things outside the folder, shortcuts and other libraries are refused. See who sees the folder in the warning at the top.
  • Revizo stores no user tokens for SharePoint. The app fetches a short-lived token when needed, and the token is never stored in the database.
  • Revizo never searches the organisation's whole SharePoint. Search covers only the connected folder.

Revizo does not ask for Sites.Read.All, Files.Read.All or other permissions that give access to the whole organisation.

:::tip Microsoft grants access to the whole site The access you grant at Microsoft applies to the whole site, not only the folder. It is Revizo's own code that keeps the app inside the folder. That also applies to «Write access only»: there Revizo's code reads nothing, but the role write at Microsoft includes reading in itself. If you want a limit at Microsoft as well, connect a separate site that holds only what Revizo should see. :::

What you need​

  1. Administrator access in Revizo. Only administrators can connect SharePoint.
  2. A Microsoft administrator who can approve the app for the organisation.
  3. Someone who can give the app access to one site. The requirements are under step 2.
  4. The site, library and folder you want to connect.

Step 1: Connect with Microsoft​

  1. Go to Settings and choose Integrations.
  2. Find SharePoint / OneDrive and choose Connect (or Configure if it is already connected). The dialog is called Microsoft SharePoint.
  3. Click Koble til med Microsoft (krever admin) (Connect with Microsoft, requires admin).
  4. Sign in with your work account. Personal Microsoft accounts do not work.
  5. Approve the app for your organisation (admin consent).

The approval gives no access to any data. It only says that the Revizo app is allowed to exist in your organisation. You are sent back to Revizo, where the dialog opens.

:::info One Microsoft organisation, one Revizo organisation A Microsoft organisation can only be connected to one Revizo organisation at a time. If it is already used by another, the connection is refused. :::

Step 2: Give the app access to one site​

Because Sites.Selected does not give access by itself, someone has to give the app access to the site. You do this once, through Microsoft Graph.

What is required:

  • The call must be made with a token that has the permission Sites.FullControl.All, for example in Graph Explorer, where you first consent to that permission.
  • If you make the call as a signed-in user, you must in addition be a SharePoint administrator (or higher) and a member of the site.
  • The same applies when you delete a permission again (see «How to withdraw access»).

Find the ids you need:

  • {siteId} is the id of the site. You can look it up with the address of the site, for example GET https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/sites/Kunder?$select=id (replace contoso and Kunder). The answer looks like contoso.sharepoint.com,{guid},{guid}. Use the whole value.
  • {appId} is the application ID of the Revizo app. Revizo does not show it in the app, but you can find it in two ways: (1) During the approval in step 1 it appears as client_id=… in the address of Microsoft's approval page. (2) After the approval, Revizo is listed under Enterprise applications in Microsoft Entra. Open it, and Application ID is on the overview page. The name in the list is the same as the one on Microsoft's approval screen.

The name in displayName is only a label. It is the id that decides which app gets access.

POST https://graph.microsoft.com/v1.0/sites/{siteId}/permissions
Content-Type: application/json

{
"roles": ["read", "write"],
"grantedToIdentities": [
{ "application": { "id": "{appId}", "displayName": "Revizo" } }
]
}

The roles decide what Revizo can do on the site:

Access level in RevizoRole in Microsoft
Write access only["write"]
Read + write in the chosen folder["read", "write"]

To browse and search the folder the app needs read access. So give read together with write when you choose «Read + write in the chosen folder». Remember that the roles apply to the whole site, not only the folder. The role write includes reading in itself.

Step 3: Choose site, library and folder​

  1. Back in Revizo, in the same dialog: search for the site under 1. Velg SharePoint-site (Choose SharePoint site) and select it.
  2. Choose the document library under 2. Velg dokumentbibliotek (Choose document library).
  3. Type the folder under 3. Mappe i biblioteket (Folder in the library), for example Save Solutions/Kunder. Always fill in a folder. The field accepts an empty value, and that means the whole document library. Revizo never uses an empty folder field as a file source (the folder is then not shown in the Add menu or in search), and the write test would write to the root of the library.
  4. Choose the access level under 4. Tilgangsnivå (Access level, see below).
  5. Click Lagre (Save). You can then click Skrivetest (Write test) to confirm that Revizo can write to the folder. Read the note below first.

Create the folder in SharePoint before you save, and type the folder name as it appears there, preferably by copying it. Revizo ignores upper and lower case, but otherwise compares the name character by character.

:::caution About the write test The write test writes a small text file in the folder. Before it does, Revizo sends a create request for every folder in the path with Microsoft's setting «replace». We have not documented how Microsoft treats that for a folder that already has content. So run the write test against a new, empty test folder first, not against a production folder full of files. :::

Write access only or Read + write​

Access levelWhat Revizo can do
Write access only (recommended) (Kun skrivetilgang)Write files into the folder. Revizo's code reads nothing from the folder and does not show it as a file source. Microsoft's role write includes reading in itself, and the access applies to the whole site. It is Revizo's own code that prevents reading and limits it to the folder.
Read + write in the chosen folder (Les + skriv i valgt mappe)The same, and in addition the folder becomes a file source in the file picker, in the Add menu and in file search for everyone in the organisation (except Viewers).

The folder only becomes a file source when the connection is active, the app is approved, site and library are chosen, the folder field is filled in and the level is Read + write in the chosen folder. The row in the Add menu and the file picker has the same name as the SharePoint site (if the name is missing, the folder name is used) and is marked «Shared folder».

The dialog sets up one folder for the organisation. If you choose another folder and save, it replaces the previous one.

What users can do​

Users see the folder as a separate row in the Add menu and in the file picker. They can browse subfolders, search the whole folder and link files. Links open the file at Microsoft with the user's own access. See Files in the task.

Everyone who can see a task, company or reconciliation sees the file name and details of a link. The file only opens for those who have access to it in SharePoint. Exception: if someone pastes a sharing link («anyone with the link»), everyone who sees the link in Revizo can open the file. Links chosen in the file picker are ordinary addresses, not sharing links.

In the location shown under file names, the names of the folders above the connected folder can appear. Their contents are not shown.

What is logged​

The audit log gets a line when:

  • SharePoint is approved (sharepoint.consented)
  • the setup is saved, with site, level and folder (sharepoint.configured)
  • SharePoint is disconnected (sharepoint.disconnected)
  • the write test is run (sharepoint.exported)
  • users link or remove links to files (cloud_file.linked, cloud_file.unlinked)

Browsing the folder and searching it are not logged in the audit log. The events are kept as long as the organisation is active. Links are kept until someone removes them, or until the task, company or reconciliation is deleted. See Data retention.

How to withdraw access​

You have three ways, from least to most drastic:

  1. Disconnect in Revizo. Open the SharePoint dialog and click Koble fra (Disconnect). The folder stops being a file source at once. The approval and the access in Microsoft remain, but Revizo no longer uses them. If you connect to the same Microsoft organisation again later, the previous site, folder and level come back.
  2. Withdraw the app's access to the site in Microsoft. List the permissions with GET /sites/{siteId}/permissions, and delete Revizo's with DELETE /sites/{siteId}/permissions/{permissionId}. After that Microsoft refuses Revizo. Users see «The source is no longer available». Revizo also stores an error message on the connection, but the SharePoint dialog does not show it, so you will mainly notice it because users get that message. The folder still stays as a row in Revizo until you also disconnect there.
  3. Remove Revizo from your organisation. Delete Revizo under Enterprise applications in Microsoft Entra. That withdraws all access, including the approval. A token that Revizo has already fetched and holds in memory can still keep working until Revizo stops using it, about five minutes before it expires. Microsoft normally gives such tokens a lifetime of 60 to 90 minutes, so at worst this lasts about an hour, sometimes somewhat longer. The folder still stays as a row in Revizo until you also disconnect there, and users then get «The source is no longer available».

To be sure, do both 1 and 2.

The links remain on tasks, companies and reconciliations. They are ordinary links with a name and an address. They open at Microsoft, and there the user's own access decides whether the file opens. The exception is pasted sharing links, which give access to everyone who has them. Disconnecting or withdrawing access in Revizo does not change that. Users can no longer browse the folder or link new files from it.

Troubleshooting​

The folder does not appear in the Add menu. Check that the access level is «Read + write in the chosen folder», that site and library are chosen, that the folder field is filled in and that the connection has not been disconnected. Users with the Viewer role do not get SharePoint sources.

«The source is no longer available». Microsoft refused the app. Check that the approval has not been removed and that the app still has the role read (and write) on the site (step 2).

«Could not load files» when users browse the folder. The folder does not exist with that name in the library, or the name in the setup does not match SharePoint. Check the spelling under 3. Mappe i biblioteket, and that the folder exists in SharePoint.

«Try again in a moment». Microsoft limits the number of requests. Wait a moment and try again.

Search does not find a file that was just added. Microsoft's search can take a little while to include new files. The file is in the folder list at once.

See also Files and access.