Skip to main content

Notifications

Dynamics 365 Community / Forums / Commerce forum / Init transaction by co...
Commerce forum
Suggested answer

Init transaction by consuming Retail Server Api using Postman throw UserAuthorizationException

Posted on by 40

Hi, 

I started to consume some Retail Server APIs related to product using postman and I'm able to receive result but when I tried to consume an API to init transaction I received this error 

pastedimage1668171950745v1.png

I need help please

Best regards

  • RS-30070451-0 Profile Picture
    RS-30070451-0 8 on at
    Init transaction by consuming Retail Server Api using Postman throw UserAuthorizationException
    Hi, we are looking to consume APIs in Postman for a client (Retail client) using MS Dynamics 365 F&O for a 3rd Party Application and have followed the following documentation:
     
    However, we are facing the following error:
     
    Microsoft_Dynamics_Commerce_Runtime_AuthorizationFailed\",\r\n  \"LocalizedMessage\": \"The user is not authorized to perform this operation
     
    We have tried multiple steps (from a lot of sources) and continue to face this error.
     
    Would you know how to resolve this?
  • Ghofrane Profile Picture
    Ghofrane 40 on at
    RE: Init transaction by consuming Retail Server Api using Postman throw UserAuthorizationException

    I found the cause, Post should be used instead of GET in Postman ( please see screenshot bellow)

    pastedimage1668804510816v1.png

  • Suggested answer
    Ana Teles Profile Picture
    Ana Teles on at
    RE: Init transaction by consuming Retail Server Api using Postman throw UserAuthorizationException

    Hi Ghofrane,

    Please create a support request so we can help you further.

  • Ghofrane Profile Picture
    Ghofrane 40 on at
    RE: Init transaction by consuming Retail Server Api using Postman throw UserAuthorizationException

    I want to show you this message

    pastedimage1668732970704v1.png

  • Ghofrane Profile Picture
    Ghofrane 40 on at
    RE: Init transaction by consuming Retail Server Api using Postman throw UserAuthorizationException

    Hi Ana,

    I checked the App registration created by the client on Azure portal and I modified them to respect the steps in learn.microsoft.com/.../consume-retail-server-api 

    But always I receive the same error when trying to init transaction,

    App registration for Retail server :

    pastedimage1668702975011v1.png

    App registration for the client :

    pastedimage1668703078963v2.png

    the app registred in Finance and operations identy provider 

    pastedimage1668703654684v5.png

    the error on Postman

    pastedimage1668703206016v3.png

    and here I can get response ( I use the same Access token)

    pastedimage1668703318959v4.png

    I need help please!

    Regards

  • Ghofrane Profile Picture
    Ghofrane 40 on at
    RE: Init transaction by consuming Retail Server Api using Postman throw UserAuthorizationException

    Hi Ana,

    Sorry for the delay, but I still wait for the client to give me access to check the app registration in Azure portal, But what is strange is that I can consume Retail server APIs related to product like Search Product By Text without receiving any errors, it only blocks when I do init transaction in order to start an empty transaction to be able to add products to this transaction after that.

    knowing that I use the same Azure credentials App provided by the client in the two scenario

  • Suggested answer
    Ana Teles Profile Picture
    Ana Teles on at
    RE: Init transaction by consuming Retail Server Api using Postman throw UserAuthorizationException

    Hi Ghofrane,

    It seems you are not authenticated correctly, please check both documents below to check what you need to do:

    learn.microsoft.com/.../consume-retail-server-api

    learn.microsoft.com/.../arch-auth-flow

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

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,435 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,317 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans