An Azure service that provides an event-driven serverless compute platform.
Hello @Fred Wong
Welcome to Microsoft Q&A.
For a timer-triggered Azure Function, the function runs as an unattended background process without a signed-in user. Because of this, Delegated permissions are generally not the appropriate authentication model, as delegated permissions require a user context.
For this scenario, the recommended approach is to use Application permissions with either a Managed Identity or Service Principal, allowing the Function App to authenticate as itself rather than on behalf of a user.
If the goal is to restrict access to only a specific SharePoint site, Sites.Selected is a good option because it does not automatically grant access to all SharePoint sites. In addition to granting the Graph API permission, the application must also be explicitly assigned access to the target SharePoint site. Microsoft Graph documentation states that Sites.Selected supports both delegated and application permission models and requires explicit assignment to the target resource before access is granted.
Based on the scenario described, your original approach using DefaultAzureCredential() with a Managed Identity aligns well with the authentication model commonly used for unattended Azure Functions accessing Microsoft Graph.
The concern raised by the IT department may relate to your organization's internal security and governance policies around application permissions rather than the behavior of Sites.Selected itself. When configured correctly, Sites.Selected provides more granular access than broader permissions such as Sites.Read.All or Sites.ReadWrite.All.
I hope this helps clarify the authentication model for your solution. Please let us know if you have any further questions.
Thank you.