web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Why I'm getting missing privileges on WebAPI Calls?

(0) ShareShare
ReportReport
Posted on by 60

Hi, I can't figure out  why am I getting this error

"Principal user (Id=xxxxxxxx-0971-e911-a81b-000d3a3b5c20, type=8, roleCount=5, privilegeCount=4532, accessMode=0), is missing prvCreaters_solicitudreservas privilege (Id=xxxxxxxx-22cf-4407-9986-34cc471264e1) 
on OTC=10585 for entity 'new_logentity'. context.Caller=xxxxxxxx-0971-e911-a81b-000d3a3b5c20. Or identityUser.SystemUserId=xxxxxxxx-c987-e911-a81c-000d3a3b5cdb, identityUser.Privileges.Count=909, identityUser.Roles.Count=2 is missing prvCreaters_solicitudreservas privilege (Id=xxxxxxxx-22cf-4407-9986-34cc471264e1) on OTC=10585 for entity 'new_logentity'." }

I'm Using a JS to create a record on new_logentity (logged as simple user) but I'm impersonating with an user(Admin) and it's unable to create the record? should i add those rights to the  normal user?  

var userId = "xxxxxxxx-0971-e911-a81b-000d3a3b5c20";
function Create_WebApi(query, obj, behalfAsOtheruser = false) {
    var req = new XMLHttpRequest();
    req.open("POST", Xrm.Page.context.getClientUrl()   "/api/data/v9.1/"   query, false);
    if (behalfAsOtheruser)
        req.setRequestHeader("MSCRMCallerID", userId);
    req.setRequestHeader("OData-MaxVersion", "4.0");
    req.setRequestHeader("OData-Version", "4.0");
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.send(JSON.stringify(obj));
    req.onreadystatechange = function () {
        if (this.readyState === 4) {
            req.onreadystatechange = null;
            if (this.status === 204) {
                //Success - No Return Data - Do Something
                return true;
            } else {
                //Xrm.Utility.alertDialog(this.statusText);
                return false;
            }
        }
    };
}

thanks.

I have the same question (0)
  • Verified answer
    Ayaka Iwai Profile Picture
    Microsoft Employee on at

    According the error, it looks you don't have Create privilege of new_logentity entitiy.

    Please check this user's security role and add the missing privilege.

    If you want know cause in detail, we have to know your org customization, so I recommend you to create a support ticket for further investigation

  • TerryShowman Profile Picture
    60 on at

    Hi, thanks for your time.

    Thats, it's exactly my doubt I'll try explain it 

    Simple User .- A normal user that hasn't privileges to create on custom entity, but prvActOnBehalfOfAnotherUser is On

    Admin User.- Has all privileges 

    So if I impersonate the simple user as admin user, does simple user must have those privileges(Create on custom entity ON)?

  • TerryShowman Profile Picture
    60 on at

    could anybody help me?

    if an user(let's call it Simple) wants to create a record in a Table with no permission to create BUT, that user can bahalf as another and impersonates the User(let's call it Admin) then.. ¿Does Simple user need privilege for Create?

  • Verified answer
    Anand Kumar M Profile Picture
    122 on at

    I believe in such case the Simple user should have basic level privileges on the entity. 

  • Verified answer
    MehranBre Profile Picture
    732 on at

    Hello

    Yes, the simple user should have at least access to read the record because when this does not happen the user can not own the record and you will receive an error.

    best regards.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 60 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 43

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans