Skip to content

Set up the Microsoft/SharePoint connection

Admin

Before CompanyWizard can read documents from SharePoint and OneDrive, the installation has to identify itself to Microsoft once. Everything you need is under Admin → System settings → “Microsoft Graph / SharePoint”.

You make exactly one decision there — the question reads “How should CompanyWizard sign in to Microsoft?” — and from then on the page only shows what your path requires.

SharePoint import is a Pro/Site feature (not in Free) → License & edition model.

Setup decision tree: desktop installations can use quick start or register their own app, either by hand in the Entra portal or through the provisioning assistant; web installations always need their own app. Every path ends the same way: save, connect to Microsoft, test the connection. Setup decision tree: desktop installations can use quick start or register their own app, either by hand in the Entra portal or through the provisioning assistant; web installations always need their own app. Every path ends the same way: save, connect to Microsoft, test the connection.

The same decision as a list:

  1. Does CompanyWizard run as a desktop app? (Including desktops paired with a server.) → continue with 2.
  2. May evanto appear in your Microsoft sign-in?
    • Yes → Quick start. Enter the SharePoint address, connect to Microsoft and consent for the organization while doing so, done.
    • No → Your own app. There are two ways to get there: create the registration by hand in the Entra portal — or have the provisioning assistant create it for you.
  3. Does CompanyWizard run in the browser only (web installation)? → Your own app, with no alternative. Quick start is not available there, and neither is the assistant.
  4. Every path ends the same way: “Save”, “Connect to Microsoft”, “Test connection” — see Connect and test.

Functionally the paths are equivalent — quick start can do everything your own app can. The only difference is whose app registration the sign-in runs on.

Quick startYour own app
Label in the form”Quick start — via evanto’s app""Your own app — your organization registers its own Microsoft app”
Your effortgrant consent once, organization-wideregister an app (by hand or via the assistant), enter the values
Works indesktop installations onlydesktop and web
evanto appears in the consent dialogyesno

What rights does who need — and what lives at your site?

Section titled “What rights does who need — and what lives at your site?”

That is the question that comes before choosing a mode, and it has a short answer: for the initial setup every path needs an administrator in your Microsoft directory, day-to-day operation needs nobody — and there is nothing from evanto to store anywhere.

Comparison of the three setup paths: with quick start the app registration belongs to evanto and your organization only grants organization-wide consent once; with your own app the registration lives in your directory, created either by hand or by the assistant. No path stores evanto credentials at your site. Comparison of the three setup paths: with quick start the app registration belongs to evanto and your organization only grants organization-wide consent once; with your own app the registration lives in your directory, created either by hand or by the assistant. No path stores evanto credentials at your site.
Quick startOwn app — by handOwn app — assistant
Role for the initial setupCloud Application Administrator (for the consent)Application or Cloud Application Administrator (register and consent)Global Administrator or Application Administrator
Role for day-to-day operationnonenonenone
Credentials to be stored from evantononenonenone
Client secretno (desktop signs in as a public client)web installations only, as a server environment variableonly if you provide a web address; shown once
Where the app registration livesin evanto’s directoryin your directoryin your directory
What is created in your directoryan enterprise application “CompanyWizard” (the consent you granted)registration + enterprise applicationregistration + enterprise application
Revokingremove the enterprise application “CompanyWizard” in Entraremove the registration or withdraw the consentas for “by hand”

It cannot be done without an administrator — for two separate reasons

Section titled “It cannot be done without an administrator — for two separate reasons”

If someone asks whether an ordinary user could consent themselves, it pays to keep two things apart:

  • Microsoft’s permission flag: open. None of the six requested permissions requires admin consent by itself — as delegated permissions, Files.Read.All and Sites.Read.All are explicitly marked “admin consent required: no”. (Only their application variants are marked “yes” — and those are never requested.)
  • Your tenant’s consent policy: closed. Microsoft’s default today is the policy managed by Microsoft (“Let Microsoft manage your consent settings”). It lets users consent to many permissions themselves, but explicitly excludes Files.Read.All and Sites.Read.All — as well as the mail and calendar permissions. Who publishes the app makes no difference. → App consent policies

In practice this means an administrator has to step in. There are two exceptions, both requiring a deliberate decision by your administrator and neither a recommended path: your tenant is still on the legacy “user consent for apps” policy — or your administrator switches to the “selected permissions” policy and classifies Files.Read.All/Sites.Read.All as low impact themselves. Neither exception reliably applies to the quick start: the evanto app is not publisher-verified, and the second policy only allows user consent for verified publishers and for apps registered in your own directory.

Four steps, no Entra portal.

  1. Choose the mode — “Quick start — via evanto’s app”.
  2. Enter “Your SharePoint address”, e.g. https://contoso.sharepoint.com (one URL per line), then “Save” — the button sits directly below the address field.
  3. Click “Connect to Microsoft”. The Microsoft sign-in opens. Sign in with an account that has administrator rights in your Microsoft organization and tick “Consent on behalf of your organization” in the consent dialog — that grants access for the whole organization. You do not have to look up the tenant, Microsoft resolves it from your sign-in.
  4. “Test connection” — see Connect and test.

Path B automatic — have the registration created for you

Section titled “Path B automatic — have the registration created for you”

If you want your own app but would rather not click through the Entra portal, CompanyWizard creates the registration for you. The result is the same as the manual path below: a registration in your directory that belongs to you.

The “Create registration automatically” button only appears when all four conditions hold:

  • The installation runs as a desktop app.
  • The mode is set to “Your own app”.
  • None of the three identity values (application ID, tenant ID, mode) is pinned by the deployment configuration.
  • You are a Global Administrator or Application Administrator in your Microsoft directory.

If you do not see the button, one of these conditions is not met — the manual path is right next to it, unchanged, and leads to the same result.

Flow of the provisioning assistant: you sign in once with elevated rights, CompanyWizard then creates the registration in your directory, grants organization-wide consent and hands the elevated write access back afterwards — with a read-back that checks the access is really gone. Flow of the provisioning assistant: you sign in once with elevated rights, CompanyWizard then creates the registration in your directory, grants organization-wide consent and hands the elevated write access back afterwards — with a read-back that checks the access is really gone.
  1. Optional: “Address of your web installation” — only if you also run a web installation. In that case the web redirect URIs and a client secret are created as well. Without an address no secret is created; the desktop needs none.
  2. Click “Create registration automatically”. A Microsoft sign-in opens in which you confirm elevated rights (see below).
  3. CompanyWizard creates the registration: your organization only (single tenant), public client, redirect http://localhost — plus the web redirect URIs if you provided an address.
  4. CompanyWizard grants the organization-wide consent for the read permissions. That removes the trip to the Entra portal for this step too.
  5. CompanyWizard hands the elevated write access back and checks that it is really gone.
  6. Save. The assistant only fills in the fields above — it does not save by itself. The message says so plainly: “Registration created. Please save now.”
  7. “Connect to Microsoft”, then “Test connection” — as on every path, see Connect and test. The assistant already granted the organization-wide consent in step 4.

To create a registration, CompanyWizard needs write access to your directory for the duration of the run. That is the question your IT security team asks before approving the button — so the answer belongs here, not in the small print:

  • What is requested: Application.ReadWrite.All and DelegatedPermissionGrant.ReadWrite.All, on the evanto application, at the moment you sign in with elevated rights.
  • What for: creating or completing the registration and granting the organization-wide consent. Nothing else.
  • For how long: the duration of the run. Afterwards CompanyWizard withdraws both permissions — and then reads back whether they have really disappeared. Only then does the assistant report success. Microsoft does not show a freshly granted consent everywhere at once, so CompanyWizard waits up to about 45 seconds until it sees the rights and until they are gone again; meanwhile the button reads “Creating registration …”.
  • In the elevated dialog, do not tick “Consent on behalf of your organization”. The assistant only needs the rights for your own account. With the box ticked they apply to every account in your organization for the duration of the run; and should handing them back fail, they would remain for everyone instead of just for you.
  • If handing them back fails: you get a red message with the path to remove them yourself — Entra → Enterprise applications → CompanyWizard → Permissions. → Error messages
  • Nothing of this remains in your directory. An ordinary user never sees these rights; after the run they are gone.
  • Older versions: Up to version 0.88 a run could leave the rights in place and still report success when Microsoft was slow to show the fresh consent. If you used the assistant with such a version, check under Entra → Enterprise applications → CompanyWizard → Permissions whether Application.ReadWrite.All or DelegatedPermissionGrant.ReadWrite.All are still listed. Running the assistant again with a current version removes such leftovers as well.

If you want to get rid of the evanto application entirely afterwards, there is a checkbox for it: “Remove the evanto application from my directory after creation”.

If “CompanyWizard” already exists at your site

Section titled “If “CompanyWizard” already exists at your site”

Before creating anything, the assistant looks for a registration of that name and then decides:

What it findsWhat it does
nothingcreates a new registration
a registration whose application ID is the one entered in the form abovecompletes exactly that one — things are only added, never replaced or removed
one or more registrations with a different application IDstops and changes nothing. The message names the IDs it found

The third case is deliberate: entering the application ID is your confirmation that this registration belongs to this installation. To reuse the existing one, enter its application ID above and start the assistant again. → Error messages

Your organization registers its own application in Microsoft Entra. This path works in every kind of installation — and it is the only one for web installations.

  1. Sign in to the Entra portal → Identity → Applications → App registrations → New registration.
  2. Pick a name freely (e.g. “CompanyWizard”).
  3. Supported account types: Accounts in this organizational directory only (single tenant).
  4. Register — the overview page then shows the Application (client) ID and the Directory (tenant) ID. You need both in step 4.

Under Authentication → Add a platform — only the rows that apply to your installation:

Your installationPlatform in EntraRedirect URI
DesktopMobile and desktop applicationshttp://localhost
WebWebhttps://<your-host>/api/integrations/microsoft/callback

For desktop, also set “Allow public client flows” to Yes.

Under API permissions → Add a permission, choose delegated permissions only:

  • Microsoft Graph: User.Read, Files.Read.All, Sites.Read.All, offline_access
  • Microsoft Graph, for calendars and mailboxes: Calendars.Read, Mail.ReadWrite, Mail.ReadWrite.Shared, Mail.Send, Mail.Send.Shared → Mailboxes with Microsoft 365
  • SharePoint: AllSites.Read, MyFiles.Read

An existing registration created before mailboxes needs the mail permissions added and then admin consent granted again — otherwise “Connect with Microsoft” on a mailbox reports that mail access is missing.

This list is also available as a copy field in the form, under “Required permissions (delegated)”.

Then choose “Grant admin consent for <your organization>”. Alternatively, grant the consent later in CompanyWizard: on the first “Connect to Microsoft” (after step 4) an administrator signs in and ticks “Consent on behalf of your organization” in the consent dialog.

What that consent means, and what it explicitly does not mean, is covered in What access the application has — the page for the conversation with your data protection officer.

Back in Admin → System settings → “Microsoft Graph / SharePoint”:

  1. Enter the Application (client) ID from the Entra overview.
  2. Tenant ID (optional) — best enter the Directory (tenant) ID from the Entra overview right away. If you leave the field empty, CompanyWizard fills it in from the sign-in as soon as one exists (when connecting or at the latest on the first test) — but only in the form. Then save once more, and on the web reload the page afterwards; until then “Test connection” stays locked with the hint “Save first: …”. A value you entered yourself is never overwritten.
  3. Enter Your SharePoint address (https://contoso.sharepoint.com, one URL per line).
  4. Save.
  5. “Connect to Microsoft”, then “Test connection” — see Connect and test.

Web installations additionally need a client secret (Entra: Certificates & secrets → New client secret). Desktop installations need none.

In web mode the whole of SharePoint usage hangs on it, not just the scheduled sync: folder picker, interactive import and connection test all draw their access tokens from the same server-side sign-in. Without the secret the interface reports that the Microsoft sign-in is not configured — and there is no file picker at all.

The secret is not entered in the user interface — it is set on the server as an environment variable:

MicrosoftGraph__ClientSecret=<the secret value>

The form only names the variable. → Environment variables & appsettings

All three lead to the same connection. What separates them is who holds it afterwards:

Quick startOwn app — by handOwn app — assistant
Effort for the initial setuplowest: one address, connect oncehighest: registration, redirect URIs, permissions, consentlow: one button, then save
Whose consent dialog your users seethat of the evanto applicationthat of your own applicationthat of your own application
Where the Microsoft audit trail livesin your directory (enterprise application), the registration itself at evantoentirely in your directoryentirely in your directory
Who maintains the registrationevantoyou — including the client secret expiry for webyou — likewise
Web installation possiblenoyesthe registration yes (with a web address); the assistant itself runs on the desktop only
Elevated rights requirednonoyes, once and only during the run
Switching laterpossible at any time, but disconnects every existing connectionlikewiselikewise

As a rule of thumb: if nothing speaks against evanto appearing in the consent dialog, quick start is the shortest path. If the registration should belong to you, take the assistant — unless your organization does not allow an application to write to the directory at all, in which case the manual path remains.

Whichever path you took: it ends with three buttons, in this order.

  1. “Save” — directly below the address field. “Connect to Microsoft” does save unsaved changes by itself first; “Test connection”, however, only checks the saved state.
  2. “Connect to Microsoft” — signs you in to Microsoft and obtains the organization consent in the same step: an administrator ticks “Consent on behalf of your organization” in the Microsoft dialog. While the sign-in runs, the button reads “Connecting to Microsoft…”.
    • Desktop: the sign-in opens in the system browser. Afterwards the browser shows “Anmeldung erfolgreich” with the English line “You are signed in. You can close this window and return to CompanyWizard.” If a SharePoint address is entered, a second Microsoft dialog follows for the SharePoint consent. If there is no answer after 3 minutes (for example because the browser tab was closed), CompanyWizard gives up and says so; no restart is needed.
    • Web: the whole page moves over to Microsoft; one sign-in covers Microsoft Graph and SharePoint at once. Afterwards you land in the admin area on the Knowledge sync tab, where the “Microsoft connection for scheduled SharePoint syncs” card reports the result — “Microsoft connection established. …”. To test, switch back to system settings. On the web it is your own account that gets connected; every user connects once themselves.
  3. “Test connection” — checks the existing sign-in silently and never opens a sign-in window. The button is locked while no account is connected or changes are unsaved; the grey hint below it says why: “Connect first: …” or “Save first: …”.

Once the sign-in is in place, the page names the account: “Connected as … (tenant …).”

On the desktop, “Connect to Microsoft” is greyed out as soon as the connection is proven — account connected, result “Connection established. …”, nothing unsaved. That is deliberate: there is nothing left to connect. “Disconnect Microsoft account”, a change in the form or a different test result enable the button again; to connect a different account, disconnect, then connect. On the web the button always stays usable.

After connecting, and on every test, the page reports in plain language what is still missing, instead of leaving you to guess at a file picker that does not work:

MessageMeaning
”Connection established. Access to sites and OneDrive.”Done.
”Access is in place. Your SharePoint address is still missing.”Enter the address, save, test again.
”Only your personal OneDrive can be searched, not team sites. …”Sites.Read.All was not granted — nothing breaks, the selection is just narrower.
”No SharePoint access token could be obtained for … with the account …. …”The address and the account belong to different organizations, or the SharePoint consent is missing.
”Your organization has not granted access yet.”As an administrator, “Connect to Microsoft” again and tick the checkbox.
”Not connected. Click ‘Connect to Microsoft’ first.”There is no sign-in (any more). Connect.
”The sign-in was canceled or timed out. …”Only when connecting on the desktop: not carried through. Connect again.

Every one of these messages — and every error message that can appear instead — is listed with cause and fix in Microsoft connection error messages.

On the web, after saving a changed application ID, tenant ID or mode, the page also reports “Client ID changed — reload the page for the SharePoint sign-in to use the new app registration.” The reason: the page’s Microsoft wiring is set up as it loads, using whichever values are stored at that moment; new values only take effect after a reload. So reload the page before you click “Connect to Microsoft”. Reloading is enough; no restart is needed. The desktop picks up the values without a reload.