CreateEnterpriseUserAsync throwing access_denied_insufficient_permissions - Access denied - insufficient permission
nthandu opened this issue · comments
- I have checked that the SDK documentation doesn't solve my issue.
- I have checked that the API documentation doesn't solve my issue.
- I have searched the Box Developer Forums and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
- I have searched Issues in this repo and my issue isn't already reported.
Description of the Issue
Create the app user throwing access denied insufficient permission error when running the sample Box.V2.Samples.Core.AppUser.Create
I have created the custom app including the manage users scope and authorised the app. I have the co-admin permission and I have authorised the app.
Steps to Reproduce
1). Clone Box.V2.Samples.Core.AppUser.Create repo
2). Replace the client secrets json file
3. Run the application and it will fail at line invoking create enterprise user.
Error Message, Including Stack Trace
Unhandled exception. Box.V2.Exceptions.BoxException: The API returned an error [Forbidden | a9f0183b757d] access_denied_insufficient_permissions - Access denied - insufficient permission
1 response, IBoxConverter converter) at Box.V2.Managers.BoxResourceManager.ToResponseAsync[T](IBoxRequest request, Boolean queueRequest) at Box.V2.Managers.BoxUsersManager.CreateEnterpriseUserAsync(BoxUserRequest userRequest, IEnumerable1 fields)
at BoxPlayground.Program.ExecuteMainAsync() in $\BoxPlayground\Program.cs:line 50
at BoxPlayground.Program.Main(String args) in $\BoxPlayground\Program.cs:line 17
To create an enterprise user you need "manage users" scope, Enteprise access and your applications must be authorized by an admin. If you are still encountering this issue after following those steps, please fill a ticket to Box User services - see https://support.box.com/hc/en-us/articles/360043693434-API-Content-API-403-access-denied-insufficient-permissions-Errors as the problem could lie elsewhere and it is out of scope of the sdk.