Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

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

(0) ShareShare
ReportReport
Posted on by 82

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 82 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 74,036 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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans