Requirement

  1. Create new row/s for each user entered in Users column in SharePoint list item if the record does not exist in Excel table
  2. Update existing row/s based on the SharePoint list item modifications if the record exist in Excel table

Solution

SharePoint List

Excel Sheet with Table

Flow attached to SharePoint List with Complete a custom action for the selected item template

Flow First Time Execution

Flow Second Time Execution with list item modifications

OpenID Connect describes a metadata document that contains most of the information required for an app to do sign-in. This includes information such as the authorization endpoint, token endpoint, tenant region scope, etc. For the discovery endpoint, this is the OpenID Connect metadata document you should use:

The {domain} can take one of two values:

ValueDescription
commonUsers with both a personal Microsoft account and a work or school account from Azure AD can sign in to the application.
contoso.comThe friendly domain name of the Office 365 tenant

The metadata is a simple JSON. See the following snippet for an example.

To get the tenant ID, we just need to parse the token_endpoint property as shown below:

We will get the following JSON for the invalid domain name.

Sample PowerApps using the above mentioned endpoint

Hope this helps. Sharing is Caring !

Microsoft Graph is a RESTful web API that enables you to access Microsoft Cloud service resources. In this article, we will go through the requests we have to make in order to access the documents in a SharePoint Document Library.

Prerequisites:

  • Register an Azure AD app and allow the app to have full/read control to SharePoint sites in all site collections without a signed-in user. Refer the Microsoft Graph permissions reference here
  • Note down the Application ID(Client ID) and Key(Client Secret)
  • Download and install Postman that simplifies the API testing or any API Testing Tool

REST Calls involved

Get Access Token 

To call Microsoft Graph, your app must acquire an access token from Azure Active Directory (Azure AD), Microsoft’s cloud identity service. Access tokens issued by Azure AD are base 64 encoded JSON Web Tokens (JWT). They contain information (claims) that web APIs secured by Azure AD, like Microsoft Graph, use to validate the caller and to ensure that the caller has the proper permissions to perform the operation they’re requesting.

Copy “access_token” value from the following API call’s reponse. This value will be used in the subsequent REST API calls as bearer token.

Replace:

{tenant-id} with your Office 365 Tenant ID. You can find the same from here.

{client-id} with Application ID copied from Azure AD Application.

{client-secret} with Key(Client Secret) copied from Azure AD Application.

Get SharePoint Site ID

We have to get the SharePoint Site ID(highlighted) where document library is located using the following url:

https://graph.microsoft.com/v1.0/sites/host-name:/server-relative-path

Replace:

{host-name} with your SharePoint online root site url.

{server-relative-path} with site’s relative path.

Get Document Libraries from a SharePoint Site

To get a list of document libraries from a SharePoint site, call the following endpoint:

https://graph.microsoft.com/v1.0/sites/site-id/drives

Replace:

{site-id} with the site id received in the previous step.

Get Files from a Document Library 

To get a list of files in a document library, call the following endpoint:

https://graph.microsoft.com/v1.0/sites/site-id/drives/drive-id/root/children

Replace:

{site-id} with the site id received in the previous step.

{drive-id} with one of the document library id received in the previous step.

Get a Specific File from a Document Library

To get a specific file from a document library, call the following endpoint:

https://graph.microsoft.com/v1.0/sites/site-id/drives/drive-id/root:/item-path

Replace:

{site-id} with the site id received in the previous step.

{drive-id} with one of the document library id received in the previous step.

{item-path} with file name or path.

I hope this article has helped you to understand the REST API calls required to reach a file in a SharePoint Document Library using Graph API.

Sharing is Caring !

Summary

Sample SharePoint Framework client-side web part for Microsoft Teams Tab illustrating Video Recording using MediaRecorder Web API.

This is an experimental web part. Because this technology’s specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes

Teams Custom Tab

About

Add Custom Tab

API Management - MSGraph

Custom Tab

Applies to

Solution

Solution Author(s)
teams-tab-video-recorder Joseph Velliah (SPRIDER, @sprider)

Version history

Version Date Comments
1.0 November 20, 2018 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • clone this repo
  • run npm i
  • go to this Microsoft article and follow the steps to package and deploy my sample
  • Go to your tenant’s API management page to approve the permission requests configured in this web part.

Features

This project illustrates the following concepts:

  • Building Microsoft Teams tab using SharePoint Framework
  • Packaging and deploying web part as a Microsoft Teams tab
  • Front/Back camera selection
  • Video recording using the supported browsers
  • Playback recording
  • Upload recorded video in user’s OneDrive root folder

Problem 

  • Office 365 Service Communications can only be accessed by any user with global admin or product admin rights (for Exchange, Skype for Business and SharePoint).
  • Dependencies tied to Office 365 Service, as well as the teams that are accountable for those configuration items

Solution 

The Office 365 Service Communications API is a REST service that allows us to develop solutions using any web language and hosting environment that supports HTTPS and X.509 certificates. The API relies on Microsoft Azure Active Directory and the OAuth2 protocol for authentication and authorization. To access the API from our application, we will need to first register it in Azure AD and configure it with permissions at the appropriate scope. This will enable our application to request OAuth2 access tokens necessary for calling the API. We can find more information about registering and configuring an application in Azure AD at Office 365 Management APIs getting started.

We can use the Office 365 Service Communications API V2 to access the following data:

  • Get Services: Get the list of subscribed services.
  • Get Current Status: Get a real-time view of current and ongoing service incidents and maintenance events
  • Get Historical Status: Get a historical view of service health, including service incidents and maintenance events.
  • Get Messages: Find Incident, Planned Maintenance, and Message Center communications.

Note: The Office 365 Service Communications API has been released in preview mode. When the General Announcement of Office 365 Service Communications API was made, the older version of the Service Communications API began a period of deprecation.

Sample Calls using Postman

Benefits 

  • Provide service health information to partners and endusers.
  • Encouraging early adoption by endusers
  • Plan our change and release management strategy for Office 365
  • Plan our monitoring strategy and tool integration for Office 365
  • Ensure Service Desk and Incident Management know how to proactively operate and support Office 365 in an end-to-end manner by integrating the tools available into our existing processes

Development Scenarios 

  • Build intelligent bots to naturally interact with our users on a website, app, Microsoft Teams, Skype and more.
  • Building Microsoft Teams tab using SharePoint Framework
  • An application that is running in the background, such as a daemon or service

If you want your SharePoint add-in to appear in SharePoint Store, you need to submit it to the Seller Dashboard for approval. You can add and save your submission as a draft in your Seller Dashboard account until you’re ready to submit it for approval.

Prerequisites

  • Familiarize yourself with the AppSource validation policies
  • Seller dashbaord account
  • Add-in file in .app format
  • App logo
  • App screenshots specific to supported languages

Steps

This section lists the steps involved in submitting your SharePoint add-in in the Seller Dashboard.

Add a new app

On the overview page, click on Add a new app button

Listing type

On the listing type page, select SharePoint add-in and click next

Upload package

On the overview page, provide the mandatory field details as shown below and click next

Language details

On the details page, select the necessary languages and provide the mandatory field details as shown below and click next

Block access

If you want to prevent the app purchases, select the countries / regions

Lead management

To get information about users who acquire your add-in, you can submit lead configuration details for your customer relationship management (CRM) system in the Seller Dashboard.

Pricing model

Choose the pricing model fits your need

Save as Draft or Submit

On your summary page, select EDIT DRAFT and make your changes. Select SUBMIT FOR APPROVAL. After your seller account is approved, you can submit your add-in to the Seller Dashboard. You can make changes at any point before you submit for approval, but during the approval process, you won’t be able to make any changes.

Microsoft Graph is the gateway to data and intelligence in Microsoft 365. Microsoft Graph provides a unified programmability model that you can use to take advantage of the tremendous amount of data in Office 365, Enterprise Mobility + Security, and Windows 10.

You can use the Microsoft Graph API to build apps for organizations and consumers that interact with the data of millions of users. With Microsoft Graph, you can connect to a wealth of resources, relationships, and intelligence, all through a single endpoint: https://graph.microsoft.com.

Register Application

In order to call Graph API you need to have a registered application within Azure Active Directory that has delegated permissions for the API application.

  • Sign in to your Application Registration Portal(https://apps.dev.microsoft.com).
  • Click on the “Add an app” button.
  • Enter the app name and click the “Create” button to proceed further.
  • Copy Application Id(Client Id) and save it.
  • Now you need to create the Application Secret. To do so click on the “Generate New Password” button as shown below. Once you click the button a pop-up screen will appear displaying the generated one time password. Copy the password and save it securely. Then click the “Ok” button as shown below.
  • Add the Microsoft Graph Permission as shown below
  • Click on the “Save” button to update the changes you made.

Grant Admin Consent

Application permissions are used by apps that run without a signed-in user present; for example, apps that run as background services or daemons. Application permissions can only be consented by an administrator.

To grant admin consent through a URL request:

  • Construct a request to login.microsoftonline.com with your app configurations and append on &prompt=admin_consent.
  • After signing in with admin credentials, the app has been granted consent for all users.

Execute Console Application

  • Download the code sample from this link.
  • Open the solution in Visual Studio.
  • Update the following values in the App.config file
    • TenantId – Office 365 Tenant Identity
    • ClientId – Application Id copied in the app registration process
    • ClientSecret – Password / Public Key copied in the app registration process
  • Save and Execute the console application

Output

Note: Output may vary based on the groups created in your tenant.

Special thanks to @Arutvicky for the code cleanup.