Trying to upload a file to the LCS Dynamics using API but keep getting failed due to permission errors.
I’m currently working on a project in LCS Dynamics 365, and Microsoft has made changes to the workflow of LCS, introducing multiple geolocations for creating and accessing projects. My project is heavily integrated with Azure DevOps, and I have to manually download the package from the build pipeline and add it to the shared asset library each time. Some of these files are quite large, and it can take up to 5-6 hours to upload them to the environment. Additionally, certain packages must be added to the asset library in multiple environments. I’m wondering if there’s a way to use the LCS Dynamics API service to upload the file to single or multiple environments at once.
After referring to the Microsoft LCS API documentation, I came across a PowerShell script called Invoke-D365LcsUpload.ps1, which includes a function for uploading the file to the environment. However, despite attempting to execute the script multiple times, I encountered a permission error (“you don’t have access to start/upload to the environment”). I’ve also tried using accounts with higher levels of privilege (project owner/environment manager), but I’m still facing the same error.
I’m exploring whether it’s possible to:
- Directly upload to the LCS environment via Azure DevOps pipeline.
- Utilize the LCS Dynamics API to upload the packages.
or any other secure methods to accomplish the task
Siddarth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.