diff --git a/README.md b/README.md index 1cf511b..ef15279 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,21 @@ Dette script gør det muligt at downloade specifikke mapper fra et SharePoint do pip install -r requirements.txt ``` +## Opsætning i Microsoft Entra ID (Azure AD) + +For at scriptet kan få adgang til SharePoint, skal du oprette en App-registrering: + +1. Log ind på [Microsoft Entra admin center](https://entra.microsoft.com/). +2. Gå til **Identity** > **Applications** > **App registrations** > **New registration**. +3. Giv appen et navn (f.eks. "SharePoint Download Tool") og vælg "Accounts in this organizational directory only". Klik på **Register**. +4. Noter din **Application (client) ID** og **Directory (tenant) ID**. +5. Gå til **API permissions** > **Add a permission** > **Microsoft Graph**. +6. Vælg **Application permissions**. +7. Søg efter og tilføj `Sites.Read.All` (eller `Sites.ReadWrite.All` hvis du har brug for skriveadgang). +8. **VIGTIGT:** Klik på **Grant admin consent for [dit domæne]** for at godkende rettighederne. +9. Gå til **Certificates & secrets** > **New client secret**. Tilføj en beskrivelse og vælg udløbsdato. +10. **VIGTIGT:** Kopier værdien under **Value** med det samme (det er din `CLIENT_SECRET`). Du kan ikke se den igen senere. + ## Konfiguration 1. Kopier `connection_info.template.txt` til en ny fil kaldet `connection_info.txt`.