
Adding an app
You can extend the functionality of your SharePoint site by adding apps to it. Just like the apps on a mobile device, SharePoint apps are ready-to-use standalone widgets or applications that help address specific business needs.
In this recipe, we will learn how to add an app from the SharePoint Store.
Getting ready
You need to have Full Control access to the site you would like to add the app to.
How to do it...
To add an app from the SharePoint Store, follow these steps:
Browse to the home page of your site.
Click New from the page editing menu and then click App, as shown in the following screenshot:

Doing so will take you to the Apps You Can Add screen of theYour Apps section. Here, you can view a list of the intrinsic SharePoint Apps (usually various kinds of lists and libraries) that you can add to your site. You will also see any apps that your organization has created or previously purchased but that haven't been added to your site yet. You can add an app from this screen by simply clicking on the app. The Facebook Integration app shown in the following screenshot is an example of one such app that my organization had purchased previously:

Next, click the SharePoint Store link from the left navigation menu to be taken to the SharePoint Store. As shown in the following screenshot, you can perform various actions on this screen (clockwise from the top right):
Change the purchase currency or select a different language to view the apps.
Search for apps by typing the full or partial name in the search box.
Filter apps by category.
Choose between paid or free apps.
Sort the results by various criteria.
Finally, as shown in the following screenshot, you can hover over any app to read a brief description of that app:

Search for your app by using one of the search and filter criteria. We will search using the text Microsoft Dynamics for our example.
Click the desired app once you are satisfied with your search results. You will then be taken to the app details screen. Make sure you click the Permissions link on this screen, as highlighted in the following screenshot, to view the permissions that the app will acquire once deployed to your site:

ClickADD ITto purchase the app for your organization.
Click Continue on the confirmation screen. You will then be taken to a screen that does the following:
Informs you that the app was added to your organization's App catalog. From this point on, owners of all sites will start seeing the app on the Apps you can add screen, as we saw earlier. They will be able to simply click on the app to add it to their site.
It allows you to continue adding the app to your site. Deselecting Allow adding this appto<site name>will still add the app to your organization's app catalog but will not add it to your site. You can add the app later to your site through the Apps you can addscreen, even if you deselect this option for now:

Click Return to site to be taken back to your site. If you did leave the Allow adding this appto <site name> option selected, you will see the following message, informing you of the permissions that the app will acquire and the actions that it can perform once it has been added to your site:

Click Trust it to confirm that you are fine with the access that the app has to your site and its users. Doing so will add the app to your site and will also redirect you to the Site contents page, where you can view the app and any other apps on your site.
Congratulations! You just learned how to purchase an app from the SharePoint Store and add it to your site. From this point on, depending on the type of app, you can either add it as an app part to a page on your site or click the app to explore its functionality. Some of the more complex apps may require your company administrators to download additional apps and components from the respective app vendor's website before the app you purchased can work. Besides this, someone in your organization may need to work on procuring the appropriate licenses from the app vendor. Almost all apps that you will find on the SharePoint Store will indicate they are free to add to your tenant. Some of them, however, will actually require you to purchase licenses directly from the vendor. For both scenarios mentioned here, you will receive appropriate messages while adding the app from the SharePoint Store.
How it works...
In addition to adding apps using theNewmenu from a page on your site, you can add SharePoint apps from the following places:
By clicking on the gear icon in the top-right corner of your site and then clicking Add an app, as shown in the following screenshot:

By using theNewmenu option of the Site contents page. Please refer to theViewing Site contentsrecipe in Chapter 2, Introduction to SharePoint Online, for more details of the Site contents page.
Types of add-ins
SharePoint custom apps are also commonly known as add-ins. From a functional perspective, SharePoint add-ins can provide three types of functionality:
App parts: These are usually simple apps that can be added as app parts or web parts on existing Site Pages. We looked at web parts as part of the previous recipe in this chapter. An example of this could be an app that gathers information from your organization's Facebook page and shows it on the home page of your SharePoint site.
Full page apps: These are usually more complex apps that provide a single-page or multipage experience for implementing a larger business functionality. These apps are usually meant to automate more complex business processes.
SharePoint extensions: These apps can be used to extend SharePoint's features, such as adding to the existing ribbons, menus, or buttons.
From a technical perspective, SharePoint add-ins come in two flavors:
SharePoint hostedadd-ins: These add-ins are completely hosted within your organization's SharePoint tenant. All the components for this add-in exist within the SharePoint site where the add-in is hosted.
Provider hosted add-ins: These add-ins usually have one or more business components hosted in a remote provider (vendor)-hosted location. These remote components could include the following:
Business logic
Data hosted as databases, blobs, caches, and so on
Any other type of components that may or may not be built and/or hosted using the Microsoft technology stack
There's more...
Your organization can decide to create their own add-ins. Please refer to Chapter 18, Custom Development - SharePoint Framework, to learn more about how to create your own add-ins, along with other aspects of SharePoint development. Your organization can publish these add-ins either to the SharePoint Store or to an internal app catalog.
App catalog
An app catalog is a site collection that is created within the organization's tenant. The purpose of this site collection is to host any add-ins that have been created by your organization. It can also be used to host third-party add-ins. At its core, the app catalog contains a document library where authorized users can upload the application's packages. These packages can then optionally go through an approval process before they are enabled in their sites by the respective site owners:

Once approved and deployed, these apps become available for the site owners to deploy through the Apps you can add screen, which we discussed previously in this recipe. Please refer to the Deploying your SPFx web part to a Microsoft 365 tenant recipe inChapter 18, Custom Development - SharePoint Framework, for more details on the app catalog.
Removing an app from your site
Site owners can remove add-ins that were previously deployed to their site by browsing to the Site contents page, clicking the three dots next to the app, and then clicking Remove from the context menu, as shown in the following screenshot:

Please note that at the time of writing, you will receive the following message when you try to remove the app from the Site contents page:

While this is expected to change in the future, for now, you will need to click the Return to classic SharePoint button to be taken to the Site contents page in classic SharePoint. You will then need to follow similar steps to delete the app from the classic Site contents page, as shown by steps (1), (2), and (3) in the following screenshot:

You will then need to click Exit classic experience, as shown by step (4) in the preceding screenshot, to return back to the modern SharePoint experience.
Please note that even though the remove operation removes the app from your site, the app will still be available for other site owners to use in their sites. This is because when the app was first installed, it was licensed to be used by the entire organization.
Removing the app license
Once you are sure no one else in your organization is using the app and provided you have the necessary permissions, you can remove the app's license by browsing to the Your Apps page, which was mentioned earlier in this recipe.
You will then need to click the Manage Licenses link in the left navigation, click your app, click ACTIONS, and then click Remove this license, as shown in the following screenshot:

Doing so will completely remove the app and its license from your organization's tenant.
See also
The Viewing Site contents recipe in Chapter 2, Introduction to SharePoint Online
Chapter 18, Custom Development - SharePoint Framework