App Registration will be used to authenticate against Microsoft Graph API.
With API Permission "Sites.Selected" you can specify on which SharePoint-Sites the App Registration will have permissions to read/write files and properties.
To get the site id of your sharepoint sites to to the following link in a Webbrowser:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives",
"value": [
{
"createdDateTime": "2021-04-03T23:11:15Z",
"description": "",
"id": "b!SMfBIuD3EE-X9GS1FpSgypE4hAdzBPVAhzjowjy6CTAFMPrY5yGSRYYXW7Jhy97f",
"lastModifiedDateTime": "2022-05-06T07:25:15Z",
"name": "Dokumente",
"webUrl": "https://bkwfmbenergie.sharepoint.com/sites/T_BKW_Test_CAPRL/Freigegebene%20Dokumente",
"driveType": "documentLibrary",
"createdBy": {
"user": {
"displayName": "Systemkonto"
}
},
"lastModifiedBy": {
"user": {
"displayName": "Systemkonto"
}
},
"owner": {
"group": {
"email": "T_BKW_Test_CAPRL@bkwfmbenergie.onmicrosoft.com",
"id": "bab76dba-25aa-4804-8cad-4fde62da958b",
"displayName": "Besitzer von T_BKW_Test_CAPRL"
}
},
"quota": {
"deleted": 0,
"remaining": 27487376431088,
"state": "normal",
"total": 27487790694400,
"used": 414263312
}
},
{
"createdDateTime": "2021-04-06T13:42:16Z",
"description": "",
"id": "b!SMfBIuD3EE-X9GS1FpSgypE4hAdzBPVAhzjowjy6CTA3sb9Pi_NxRJ3lfYXRyKTz",
"lastModifiedDateTime": "2021-10-02T21:16:08Z",
"name": "Vertragsablage",
"webUrl": "https://bkwfmbenergie.sharepoint.com/sites/T_BKW_Test_CAPRL/Vertragsablage",
"driveType": "documentLibrary",
"createdBy": {
"user": {
"displayName": "Systemkonto"
}
},
"lastModifiedBy": {
"user": {
"displayName": "Systemkonto"
}
},
"owner": {
"group": {
"email": "T_BKW_Test_CAPRL@bkwfmbenergie.onmicrosoft.com",
"id": "bab76dba-25aa-4804-8cad-4fde62da958b",
"displayName": "Besitzer von T_BKW_Test_CAPRL"
}
},
"quota": {
"deleted": 0,
"remaining": 27487376431088,
"state": "normal",
"total": 27487790694400,
"used": 414263312
}
},
{
"createdDateTime": "2022-09-15T09:41:10Z",
"description": "sharepoint list",
"id": "b!SMfBIuD3EE-X9GS1FpSgypE4hAdzBPVAhzjowjy6CTC6kAXUUK7qSLG7oSTLYNsQ",
"lastModifiedDateTime": "2022-09-15T09:41:10Z",
"name": "Teams Wiki Data",
"webUrl": "https://bkwfmbenergie.sharepoint.com/sites/T_BKW_Test_CAPRL/Teams%20Wiki%20Data",
"driveType": "documentLibrary",
"createdBy": {
"user": {
"email": "luca.caprez@bkw.ch",
"id": "9e5da9b4-7023-4d36-86f5-33768907270f",
"displayName": "Caprez Luca Noah, BKW"
}
},
"lastModifiedBy": {
"user": {
"email": "luca.caprez@bkw.ch",
"id": "9e5da9b4-7023-4d36-86f5-33768907270f",
"displayName": "Caprez Luca Noah, BKW"
}
},
"owner": {
"group": {
"email": "T_BKW_Test_CAPRL@bkwfmbenergie.onmicrosoft.com",
"id": "bab76dba-25aa-4804-8cad-4fde62da958b",
"displayName": "Besitzer von T_BKW_Test_CAPRL"
}
},
"quota": {
"deleted": 0,
"remaining": 27487376431088,
"state": "normal",
"total": 27487790694400,
"used": 414263312
}
}
]
}