Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
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?

  • NND Profile Picture
    4 on at
    Re: Power Platform Build Tools - Create Environment Task

    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)

  • cjbarnaby Profile Picture
    44 on at
    Re: Power Platform Build Tools - Create Environment Task

    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
  • Aedu Profile Picture
    107 on at
    Re: Power Platform Build Tools - Create Environment Task

    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.

  • MayankP Profile Picture
    462 on at
    Re: Power Platform Build Tools - Create Environment Task

    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

     

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard