GetEnterpriseUsersAsync() permissions
I'm working with JWT auth using the .NET SDK and I'm having and issue using the GetEnterpriseUsersAsync() method. I get an exception stating insufficient permissions, but I'm unsure as to what needs to be modified to obtain the correct permissions. Can somebody assist?
var config = BoxConfig.CreateFromJsonFile(S);
var boxJWT = new BoxJWTAuth(config);
var adminToken = boxJWT.AdminToken();
var adminClient = boxJWT.AdminClient(adminToken);
var boxUsers = await adminClient.UsersManager.GetEnterpriseUsersAsync(userType: "all");
-
I assume you setup an app in the Box Developer Console for your testing. If so, did you include the Manage Users application scope? I think this might be the scope you need for getting a list of users. Also, on the General Setting tab you request app authorization? The admin will get an email to review and authorize your app. If you are the admin, you can go the admin console, custom applications and authorize your app. However, if this is a single user instance of Box, you might not be able to get this working since I believe that an admin cannot impersonate another admin to make this call. I'm not positive that's your issue, but I've seen this before as causing an issue.
サインインしてコメントを残してください。
コメント
1件のコメント