我想在特定的共享驱动器(团队驱动器)中添加成员。我尝试插入权限请求,如下所示:
var listPermisssion = new List<TeamDrivePermissionDetailsData>() { };
TeamDrivePermissionDetailsData permission = new TeamDrivePermissionDetailsData()
{
Role = role,
TeamDrivePermissionType ="member" ,
};
listPermisssion.Add(permission);
Permission tdrivePermission = new Permission();
tdrivePermission.EmailAddress = who;
tdrivePermission.TeamDrivePermissionDetails = listPermisssion;
var requestPermission = service.Permissions.Create(tdrivePermission, sharedDriveId);
requestPermission.Execute();
我收到此错误:错误:“ Google.Apis.Requests.RequestError
权限角色字段为必填。 [400]
感谢帮助。
Permissions:create
方法需要如role
中所述指定type
和documentation。>
[member
不是type
的有效选项-它应该是以下选项之一: