web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Platform Build T...
Power Apps
Unanswered

Power Platform Build Tools - Create Environment Task

(0) ShareShare
ReportReport
Posted on by 107

Hello together
I just wanted to try the "Create Environment" task, but already stumble over the point with the creation of the service connection. Maybe I understand something wrong with this task and hope you can help me:
I want to create a completely new environment. But how can I do that, if I already have to specify the url of the environment in the url parameter of the service connection?

As an example:

I want to create a complete new environment called "test-<currentdate>". DisplayName will be "test<currentdate>" and url should be https://test-<currentdate>.crm4.dynamics.com (for example https://test-20211210.crm4.dynamics.com). Maybe the last task of the pipeline will then be deleting the already created environment. So when I rerun the pipeline at the same day the environment can be created again from scratch.

So how do I have to configure the Create Environment Task and the Service Connection?

I have the same question (0)
  • MayankP Profile Picture
    464 on at

    Hi @Aedu 

     

    Refer following article for this, see if this helps..

     

    https://docs.microsoft.com/en-us/power-platform/alm/devops-build-tool-tasks#environment-management-tasks

     

  • Aedu Profile Picture
    107 on at

    Thank you @MayankP for responding.

     

    This is exactly the article I don't understand. Then Power Platform Create Environment Task requires parameter PowerPlatformSPN. Description of that parameter is:
    "The service endpoint that you want to create the environment (e.g., https://powerappsbuildtools.crm.dynamics.com). Defined under Service Connections in Project Settings using the Power Platform connection type."

     

    How can you create a completely new environment if you need to know the name of the environment beforehand for the service connection? Using Username/Password is not an option in that scenario.

  • cjbarnaby Profile Picture
    44 on at

    Hi @Aedu , 

    Probably too late to be of any use to you, but hopefully this will help the next person to stumble across this post when facing the same issue. 

    It seems the/a solution is to create a Generic Service Connection in Azure DevOps; in your ADO project, go to Project Settings > Service Connections, click New service connection and select 'Generic' from the list of server connection types.

    The following configuration worked for me:

    • Server URL: The Instance URL for the default environment of the tenant in which you want to create the environment (though I suspect any environment in the tenant will work)
    • Username and password: The credentials for an account with privileges necessary to create environments in that tenant
  • NND Profile Picture
    4 on at

    You can also install Power Platform Build Tools Extension in your DevOps organisation. This will allow you to create a Service Connection of type Power Platform which can be used with this task. Creation of Dynamics 365 Environments using Azure DevOps pipeline – Nikhil Deshpande's blog (wordpress.com)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard