none
LogicApps with Dynamics 365 F&O connection error: "Could not retrieve values. Unathorized client." RRS feed

  • Question

  • Hello,

    I've decided to test out new Dynamics 365 F&O feature "Business Events" with LogicApps - however, I've ran into issues that need to be resolved. I hope you guys might point out what is the solution.

    After setting everything up and trying to use "When a Business Event occurs (Preview)" trigger in LogicApps, I get the following error after trying to retrieve "Category" field:

    • "Could not retrieve values. Unathorized client. RequestId: ..."

    What could be the issue? Also, for some reason it does not show my D365 F&O instance in the list and I had to enter the link as custom value.

    Below I've listed what I have done to ensure the connection happens:

    • Enabled "Business Events" in D365 F&O
    • Created Service Bus Namespace in Azure and a queue for the LogicApp.
    • Registered an application in Azure AAD for the LogicApp as WebAPI and URL being: https://my-instance-url.dynamics.com/oauth
    • Created a Key Vault for the LogicApp and created a secret containing Service Bus primary connection string.
    • Added the registered app to Key Vault access policies and gave it all permissions.
    • Created Service Bus Queue endpoint in D365 Business Events settings (containing queue name, registered app ID and secret, key vault link and secret) and it connected successfully.
    • Tried creating a new LogicApp with the preview trigger. I've put my instance url as custom value in "Instance" field (my-instance.url.dynamics.com), then I got stuck on "Category" field as I get the error mentioned above.

    What could be the issue? Perhaps some steps I did were not correct?



    • Edited by skrid Thursday, March 7, 2019 7:21 AM
    Thursday, March 7, 2019 7:19 AM

All replies

  • Can you talk to FO successfully using one of the older connectors e.g. get a record, for example?

    I haven't had a play around with the new Business Events logic app trigger yet, but my colleague did get FO posting successfully to the Flow trigger after setting everything up appropriately.

    Thursday, March 7, 2019 9:59 AM
  • Hi ,

    As per your description. i think its much more of account permission issue .

    Have you tried D365 F&O retrieve connectors , are you able to see your instance when you add  D365 F&O action ? If not then it is much more of account permission issue 

     


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Thursday, March 7, 2019 11:40 AM
  • Can you talk to FO successfully using one of the older connectors e.g. get a record, for example?

    I haven't had a play around with the new Business Events logic app trigger yet, but my colleague did get FO posting successfully to the Flow trigger after setting everything up appropriately.

    The older connectors I assume are for Dynamics 365 CRM, not Dynamics 365 F&O. I tried other retrieving connectors for F&O, but same issue of being unauthorized.

    • Edited by skrid Friday, March 8, 2019 8:33 AM
    Friday, March 8, 2019 8:28 AM
  • Hi ,

    As per your description. i think its much more of account permission issue .

    Have you tried D365 F&O retrieve connectors , are you able to see your instance when you add  D365 F&O action ? If not then it is much more of account permission issue 

     


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Do you think the account permission issue on Azure side? What could be the permissions related to?

    I just tried the retrieving connectors but no luck either, still says I am unathorized. Although the e-mail I am logged in with has system administrator role in D365 F&O:

    • When a HTTP request is received (success) -> Get list of D365 F&O entities (Preview) (Failed: Unauthorized.)
    Friday, March 8, 2019 8:32 AM
  • The older connectors I assume are for Dynamics 365 CRM, not Dynamics 365 F&O. I tried other retrieving connectors for F&O, but same issue of being unauthorized.


    No, I mean the older 'retrieve' connectors for F&O as per Abhishek's comment :)

    If you can log into F&O using those credentials, in theory you should at least be able to create your connection in the logic app as part of a e.g. retrieve record action - especially if you're using an admin account.


    Friday, March 8, 2019 9:50 AM
  • Hey skrid Were you able to get this resolved?
    Monday, March 25, 2019 10:25 PM
    Moderator