Error 403 when creating a new user via API request

Options
reynaldo.junior
reynaldo.junior Posts: 6 🌱
edited May 2023 in Development

Hi,
I'm trying to create a new user using a Postman request, but I'm getting error 403 (Forbidden). I already tested the whoami request and was successful (status 200); my username has all the credentials to create a user, and I'm using the scope "core:: user::" when creating the token.

Is there something I am missing?

I really appreciate any help you can provide.

Tagged:

Best Answers

  • Paul.P.783
    Paul.P.783 Posts: 13
    Answer ✓
    Options

    Hello @reynaldo.junior,

    Generally speaking, a 403 error (not authorized) could point to any number of permissions. To identify the issue, you could either create a discussion with other developers in our Developers Group, found here, or submit a case to our Support team to get the details and take a look further. Or choose both, whatever works for you.

    Please keep us posted if you find a solution and completed your intended workflow.

    Hope this helps!

  • reynaldo.junior
    reynaldo.junior Posts: 6 🌱
    Answer ✓
    Options

    Thanks @Paul.P.783

    I will do both.

Answers

  • Ian.P.710
    Ian.P.710 Posts: 25
    Options

    So looking at this the scope I think should be users:*:* not user:*:* Other than that is if you also need a OrgDefinedId some sites are setup to require one.

    However I would say change the scope and re authenticate as a first step.

  • reynaldo.junior
    reynaldo.junior Posts: 6 🌱
    Options

    Hi @Ian.P.710

    Thanks for your reply.

    You were right, the correct syntax should be "users:*:*", but unfortunately I'm getting the same error.

  • Heba.A.271
    Heba.A.271 Posts: 85
    Options

    Hi Reynaldo,

    Thank you for reaching Brightspace community.

    This error is related to your permission , meaning you don't have permission to create a new user over the system. Can you check your role permission for Users tool, 'Create a User in the Database' ?

    Hope this helps!

    Regards,

  • reynaldo.junior
    reynaldo.junior Posts: 6 🌱
    Options

    Hey @Heba.A.271 ,

    My role is Super Administrator, here is a screenshot with the database permision:

  • reynaldo.junior
    reynaldo.junior Posts: 6 🌱
    Options

    Thanks @Paul.P.783

    I'll do both.