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 / Service Principal setup
Power Apps
Unanswered

Service Principal setup

(1) ShareShare
ReportReport
Posted on by 4

Hello,

 

Does anyone know how to setup a Service Principal to access PowerApps in devops pipeline through connection service? Do we have to assign the Service Principal certain permissions?

 

Thank you 

I have the same question (0)
  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @cxiong,

    Assuming this SPN requires access to Power Apps CDS, you can follow these steps:

    1. Create the object in Azure AD: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/walkthrough-register-app-azure-active-directory
    2. Create the user in CDS and assign a security role: https://docs.microsoft.com/en-us/power-platform/admin/create-users-assign-online-security-roles#create-an-application-user
    3. You'll than need to create a generic service connection in Azure DevOps and use that connection with Power Apps Build Tools

     Hope this helps!

  • Ryan S Newcomb Profile Picture
    236 on at

    What do you use for the generic connection if you are setting it up as service principal? Do you only need to enter the app registration Secret in the Password/Token field?

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    I also had to create that user in Office 365 (no license assigned) and made sure that the CDS application user's username (service principal) was the same as in O365. I then use the O365 username and password in the generic service connection since unfortunately as of now, it doesn't seem to work with client ID and secret...

  • Ryan S Newcomb Profile Picture
    236 on at
    So you set it up as non-interactive user rather than as an application user?
  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    It’s setup as both

  • Ryan S Newcomb Profile Picture
    236 on at

    Today I noticed a new Service Principal option on the Export Solution task in the pipeline editor. (Perhaps it was there before but I didn’t notice it.)  I was able to use that option to a setup what appears to be a new service connection type specific to the Power Apps Build Tools (Before, I was using Generic service connection).  I set that up and it worked just fine.


    That new connection type option was also available for Import Solution tasks.

     

    I didn’t notice it for the environment tasks (eg reset).

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @NewcombR@cxiong,

    You can now connect with a SPN (app ID, secret) with the new Power Platform service connection type! Make sure the URL is CDS/D365 organisation URL (<name>.crm<#>.dynamics.com) and not the usual "https://management.core.windows.net/".

    I'm now using it and works like a charm!

    2020-06-07_19-27-40.png  

  • NPrice99 Profile Picture
    1,302 on at

    Hi @EricRegnier 

     

    Are you saying I can use ClientID and Secret for both PowerApps and PowerAutomate authentication ?

     

    Where is this documented ?

     

    Thanks

     

    Nigel

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    @NigelP, not quite, what I was mentioning was for Service Connections in Azure DevOps. I know in Logic Apps, you can use a client ID and secret with the Common Data Service connector but I haven't tried with canvas apps. As for Power Automate, suggest to use the Common Data Service (current environment) connector which I don't think can be used with a client ID/secret yet.

    You should submit the idea at: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

    Cheers

  • Community Power Platform Member Profile Picture
    on at

    @EricRegnier , 

    - What CDS security role is needed for Azure DevOps to export/import a Solution?

    - Does the Service Principal need any specific permissions/roles?

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard