Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Granting security to custom AIF service?

(0) ShareShare
ReportReport
Posted on by 152

I've created a custom AIF service that will post Inventory Transfer Journals from a 3rd party application/service. I checked "Allow trusted intermediary to impersonate" so the service can pass "LogonAsUser=Domain\TestUser" and then the journal will actually get posted by the correct user.

The user account "Domain\TestUser" can create/post transfer journals in AX normally with their current security.

I created a privilege and added the service operation as an entry point, but when I try and call the service as the user, AX is asking for random security to all of the tables it touches.

pastedimage1655926016935v1.png

It doesn't seem right that I have to continually add each table that it touches for security?? Shouldn't the entry point alone be sufficient? The user already can post journals manually.

First message was:

message=Cannot select a record in Relationship between the inventory journal line and the inventory transactions originator (InventTransOriginJournalTrans).
Access Denied: You do not have sufficient authorization to modify data in database.

I added the table to the security privilege and then the next message:

message=Cannot create a record in On-hand inventory changes (InventSumDelta).
Access Denied: You do not have sufficient authorization to modify data in database.

  • Wmyk Profile Picture
    152 on at
    RE: Granting security to custom AIF service?

    I do have that, but it's [SysEntryPointAttribute(true)]. I had never considered what the "true" did. It looks like that enforces the table checks.

    Changing it to "false" is what I was looking for. I knew I was missing something obvious!

  • Verified answer
    Martin Dráb Profile Picture
    231,895 Most Valuable Professional on at
    RE: Granting security to custom AIF service?

    If I understand it correctly, you can disable these checks by using false in SysEntryPointAttribute associated with this service operation.

    You can also use Code Permissions to add the necessary permissions to the service.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,140 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,895 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans