Is there a API to create sites an Azure App Service dynamically from a web app - visual-studio

My requirement is to develop an application that should
create static html files
create a new site (with the static html files in #1) in Azure App Service or Hosting server.
i.e for #2,I need to automate the Publish activity that's done from Visual Studio to take it to the public server. So say on a Button click, the app should use the required details like credentials, app service\hosting provider details... and create a new site there.
My Query
Is this possible?
If so please do share it with me or send me some pointers on it.
Else let me know how I can implement this.

You could create azure app service using rest api with this link.
Also, you could deploy webapp to azure app service with ZIP or WAR file. Please refer to this one.
The required details like credentials, app service\hosting provider details you need to manually fill down to achieve deploy webapp function.

Related

Error after changing my Application ID URI to CDN endpoint

I'm trying to deploy my application built on the team toolkit scaffolding for multi-tenant. I created a CDN endpoint and updated my state JSON object to reflect the new front-end endpoint. After provisioning, deploying and making the account setting change to multi-tenant. I uploaded my app to our company tenant and I'm getting the following error in my tab configuration where the user is supposed to be able to log in.
OutOfRangeInputOne of the request inputs is out of range. RequestId:47fca9cc-f01e-004a-7a11-e434e9000000 Time:2022-10-19T23:24:05.3740757Z
Is there any workaround to get a team's toolkit app to be multi-tenant supported? I am trying to get this app validated for the teams store.
You can follow the steps here to enable multi-tenant in Teams Toolkit:
Provision your Tab project.
Open .fx\states\state.{envName}.json and note the value ofdomain under fx-resource-front-hosting.
Create Azure CDN and CDN endpoint and point to frontend storage. Note you need to choose endpoint type as Storage static website when creating your CDN.
Open templates\azure\provision\azureStorageTab.bicep file, and find the following two lines:
output endpoint string = 'https://${siteDomain}'
output domain string = siteDomain
and replace with:
output endpoint string = 'https://sample.azureedge.net'
output domain string = 'sample.azureedge.net'
Open templates/appPackage/aad.manifest.json, find signInAudience and set value as AzureADMultipleOrgs
Open .fx/configs/azure.parameter.${env}.json and find the following line:
"m365TenantId": "{{state.fx-resource-aad-app-for-teams.tenantId}}",
and replace with:
"m365TenantId": "common",
Run Provision and Deploy in your project.

TeamsFx Hello World Auth Service

I am running the Hello-World-Tab-With-Backend example from TeamsFx. As expected when debugging it launches the Front end and back end services but I noticed that its also launching an Auth service (see image below). Can someone help me understand what the Auth service is doing? Does this also need to be deployed when I deploy my app to production? The README does not provide any information on this.
Simple Auth (Auth Service you motioned) is a backend service helping Teams tab app access first/third party services from client side. TeamsFx SDK calls the Simple Auth Service to get Access Token in Tab apps. You can find the source code and ReadMe of Simple Auth here.
When local debugging, toolkit will launch a local session to host the Simple Auth Service.
When provisioning from Teams Toolkit, toolkit will provision a Web app on Azure and deploy the source code, thus you don't need to care about the deploying.

ASP NET Boilerplate API project creation problem

It is a first time that I am using ASP.NET Boilerplate for API development. There are default features like multi tenancy and role management which I don’t want to use in the template. When creating a new project. in the project wizard I am choosing “Single Page Web Application” and I am unchecking the “Include login, register, user, role and tenant management pages” box. But when I do this, it is removing the connection between Swagger and Application Service. So the methods I am writing in Application Service are not being translated as API endpoints automatically.
Ideally, I want this: ABP Template + Empty API solution + swagger connection.
Am I missing something? Could you point me in the right direction? Thanks in advance.
"The methods that I am writing in the Application Service are not automatically translated as API endpoints." Regarding that, the app service should be translated automatically in the version that does not include login and roles, check the documentation. Regarding the swagger, you have to add it manually.

Unable to publish Self Hosted Private App using Enterprise account

After generating APK definition file, i tried to publish it on play console by following below reference
Reference : Publish an externally hosted app in the Play Console
step-1) Sign in to the Play Console with your organization's administrator account.
step-2) Create a private app by publishing to your own organization. Ensure you add at least one organization to Private app access.
step-3) Click Upload external APKs.
Issue : In step-2 we need to create new app in play console. I'm unable to create new app when login play console with enterprise account(Not an Android Developer Account) create app button is noneditable, do i need to add any other settings to make it editable.
You need to have android developer account for creating apps, there is a fees of 25$ to create developer account.
Unfortunately, you cannot use your enterprise account to create apps in the Play Developer Console, you need to have a Google Play Developer Account to do this. However, you can use the following steps to create an externally hosted app:
Upload an apk via iFrame with the same app id as the app you want to host externally. This will essentially act as a “dummy” app.
Generate a JSON metadata file using the steps described here. Make sure that the version of this externally hosted apk is higher than the one uploaded via iFrame.
On the iFrame, click the app and open the Play Developer Console via the “Make advanced edits” button.
Create a new release by navigating through the sidebar, then Production > Create new release.
Upload your JSON metadata file under “App bundles and APK”.
Then, Save > Review Release > Start rollout to production.

Developing SharePoint App Causes a new url to generated each time I deploy

I am developing a SharePoint app that communicates with social feeds such as Twitter, Facebook (the user has to sign in ofcourse through the App using OAUTH). My problem is that everytime I deploy the app (using VS) it generates a new url and I need to keep registering this url with the community sites (Twitter, Facebook). Is there another way to overcome this problem.
I guess you are talking about the App Web wich is created every time the application is deployed (url has a form like that https://prefix-id.tenantdomain.tld/pathOfWebItHasBeenDeployedTo)
This is by design and here is some documentation about it
Then I guess the problem is because you're using OAuth implicit flow which requires url not to change over time. Unfortunately this is a by design limitation, to work around that you'd have to transtion to a provider hosted application. (therefore hosting it on your own server with a fixed url)

Resources