Hi
I need to create a solution, dataverse and app and customizations using PowerShell and Rest API
I am using this information:
Create, manage, and publish model-driven apps using code - Power Apps | Microsoft Learn
However, I am getting a 401 not authorized error message, so this information is not complete as it doesn't mention anything about security. Is there a published reference of the various APIs that can be used to create model-driven apps using REST and PowerShell
$token = '0000000-0000-000000000-1-000000'
$url = 'https://dev.api.crm3.dynamics.com/api/data/v9.2'
$method = 'POST'
$headers = @{
'Content-Type'='application/json'
'Authorization'='Bearer $token'
'charset'='utf-8'
'OData-MaxVersion'='4.0'
'OData-version'='4.0'
'Accept'='application/json'
}
$body = @{
"name"="App20"
"uniquename"="App20"
"webresourceid"="953b9fac-1e5e-e611-80d6-00155ded156f"
}
Invoke-RestMethod -Method $method -Uri $url -Body($body|ConvertTo-Json) -Headers $headers -ContentType "application/json"