Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Grant Warehouse Shipment Page API Access when OAuth Grant Type=Client Credentials

Posted on by 77

Hi fellow developers,

I am setting up a Service-to-Service authentication in AAD to expose APIs to external warehouse integration partners. 

At this stage, I am able to setup the authentication with Grant Type: Client Credentials and it works with regular API Page access, but when I tried to call the warehouse shipment API, I am getting 400 Bad Request: 

You must first set up user INTEGRATION PARTNER as a warehouse employee.
I know how to setup warehouse employee if I am accessing via user-impersonation but with Client Credential access, I am not accessing the page as a signed-in user so I cannot setup warehouse employee for the account.
Is there a way to get through the Warehouse Employee setup validation for Service-to-Service authentication? Or the only way I have is to create custom API instead of using the Warehouse Shipment API page.
Thank you,
Ginger
  • Ginger Frog Profile Picture
    Ginger Frog 77 on at
    RE: Grant Warehouse Shipment Page API Access when OAuth Grant Type=Client Credentials

    Thanks a lot ZHU.

    I couldn't find the corresponding Username in the Warehouse Employee dropdown list, so I assumed that's not possible. But it looks like I can just type the Username in the Warehouse Employee column and it worked!

    Thank you,

    Ginger

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 70,124 Super User 2024 Season 2 on at
    RE: Grant Warehouse Shipment Page API Access when OAuth Grant Type=Client Credentials

    Hi, When you add Azure Active Directory Application in BC, a user will be automatically created, and you can just add this user to Warehouse Employee. This should solve the problem.

    pastedimage1665623466424v1.png

    pastedimage1665623474861v2.png

    pastedimage1665623501853v3.png

    Hope this helps.

    Thanks.

    ZHU

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans