Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Fetch Environment metadata through LCS API

(0) ShareShare
ReportReport
Posted on by 5

Hi All,

I'm trying to fetch environment metadata through LCS API for which I have followed the process mentioned in the below link.

Fetch environment metadata - Finance & Operations | Dynamics 365 | Microsoft Learn

I'm able to successfully fetch the access token through a POST request as shown below.

pastedimage1678773194229v1.png

pastedimage1678773266696v2.png

However, while trying to fetch the environment metadata through a GET request, we are unable to get it and facing the below errors.

pastedimage1678773449084v3.png

Also, tried with LCS cloud hosted environments page URL and the output is as shown below.

pastedimage1678773604564v4.png

Can someone know how to resolve this?

  • nunomaia Profile Picture
    nunomaia 9 Super User 2024 Season 1 on at
    RE: Fetch Environment metadata through LCS API

    Check in Database movement API - Authentication - Finance & Operations | Dynamics 365 | Microsoft Learn

    You auth request is not as documented. You mixing header info in request body.

  • RE: Fetch Environment metadata through LCS API

    Hi Judy,

    I rechecked the same with different browsers and in different systems too but still, the issue is same. I don't see a connectivity issue from my end.

  • RE: Fetch Environment metadata through LCS API

    Hi Nuno,

    Tried the steps mentioned in your blog post. However, while fetching the access token through a POST request I'm experiencing the below error.

    "error_description": "AADSTS65001: The user or administrator has not consented to use the application with ID '50c66f94-c5f3-4793-a77****e' named 'D365_LCS'. Send an interactive authorization request for this user and resource.\r\nTrace ID: 73de8e13-a0e5-496a-9ac6-04719828f100\r\nCorrelation ID: 010ab390-1629-4e03-8ded-4bf376d12092\r\nTimestamp: 2023-03-15 11:35:57Z"

    Also retried the same after granting admin consent, but still same.

    Can you help me here?

  • Suggested answer
    nunomaia Profile Picture
    nunomaia 9 Super User 2024 Season 1 on at
    RE: Fetch Environment metadata through LCS API

    Take a post on postman request created on this blog post

    nunomaia.github.io/.../lcs-api.html

  • Suggested answer
    huijij Profile Picture
    huijij 19,811 on at
    RE: Fetch Environment metadata through LCS API

    Hi Kotla,

    For the postman's failure to send your request, you may be experiencing connection problems. Check your connection by trying to open a page in your web browser. Or restart postman to try again.

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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans