For the Graph API, I created an app, with all the required delegated permissions. The authentication is done with a secret.
So it works until the setting to limit external sharing to a Specific Group is set. Then I get the error message that sharing is disabled on the SharePoint site. Even though the app respectively the service principal is member in the group for external sharing.
I know the following alternative, but it does not meet my requirements: Allow sharing only with existing guests and disable inviting guests by a normal user in Azure AD. Problem the sharing is possible with all existing guests.
Does anyone have an idea how I can solve the problem or has any other suggestions?