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 / How do I authenticate ...
Power Apps
Unanswered

How do I authenticate to create a model-driven power app via the web api?

(0) ShareShare
ReportReport
Posted on by 6

When following the docs to create a model-driven power app using code, what steps do I need to take to successfully make this post request below? I am currently getting a status of 401. Where do I find the bearer token?

https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/create-manage-model-driven-apps-using-code

 

```

POST [Organization URI]/api/data/v9.0/appmodules HTTP/1.1
Content-Type: application/json; charset=utf-8
OData-MaxVersion: 4.0
OData-Version: 4.0
Accept: application/json

{
"name": "SDKTestApp",
"uniquename":"SDKTestApp",
"webresourceid":"953b9fac-1e5e-e611-80d6-00155ded156f"
}
```

I have the same question (0)
  • thomasfnorthrup Profile Picture
    252 on at

    Hello, thanks for reaching out. 

    For custom development you need to authenticate to the API using Oauth. This link walks through the requirements. You need to create an application registration in your Azure AD, give it permissions to Dynamics 365 or Dataverse, then create an app user in the Power Platform Admin center. Then you use the client id and secret from the app registration to make a call to get the bearer token which you then pass into your call to the API. 

    Use OAuth authentication with Microsoft Dataverse (Dataverse) - Power Apps | Microsoft Learn

     

    If this helped please mark as a solution or give a kudos. 

    Have a wonderful day!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard