Microsoft has been progressively disabling sharing invitations on both Business and Personal accounts - the driveItem invite API returns 400 sharingFailed for any recipient on affected accounts - which makes the permission writing tests impossible. Probe the API once and skip the tests which need it when it is refused.