Following on from my previous post titled “Using Microsoft Graph Open Extensions with PowerApps” I challenged myself to recreate the same example using a SPFx web part. To read more about what Open Graph Extensions are please read the previous post.
How did the experience compare?
Although creating a SPFx web part is markedly different and
requires coding skills compared to a low code solution such as PowerApps, there
are some benefits;
·
You don’t need to create a Azure App Registration
·
You don’t need to create Custom Connectors
·
You don’t need a premium PowerApps Licence
You can view the full solution via the link below, but here
are the most important elements of the web part;
Graph Scopes
The following graph permissions are required and will need
to be approved in the API Permissions;
·
User.Read
· User.ReadWrite
Graph Calls
The web part makes the following four Graph calls;
Create
Creates an Open Graph Extension named “com.bestranet.roamingSettings”
with a property named “plane”.
Verb |
POST |
Endpoint |
|
Body |
{ "@odata.type":
"#microsoft.graph.openTypeExtension", "extensionName":
"com.bestranet.roamingSettings", "plane": "Concorde" }; |
Read
Retrieves an Open Graph Extension named
“com.bestranet.roamingSettings”
Verb |
GET |
Endpoint |
|
Body |
n/a |
Update
Updates an Open Graph Extension named
“com.bestranet.roamingSettings”
Verb |
PATCH |
Endpoint |
|
Body |
{ "@odata.type":
"#microsoft.graph.openTypeExtension", "extensionName":
"com.bestranet.roamingSettings", "plane": "Concorde" }; |
Delete
Deletes an Open Graph Extension named
“com.bestranet.roamingSettings”
Verb |
DELETE |
Endpoint |
|
Body |
n/a |
The full solution can be found here
Comments
Post a Comment