Teams and Office App to create custom offer documents for further processing. Fully C# and Blazor based.
This sample is a Teams personal Tab to act as a Microsoft 365 across application (Teams, Outlook, Office) to act in Teams and Outlook. The App will create custom offer documents based on a custom SharePoint content type with custom document template for further processing such as review and finalization (PDF archive).
App live in action inside Teams
Please list any portions of the toolchain required to build and use the sample, along with download links
Version | Date | Author | Comments |
---|---|---|---|
1.0 | Aug 28, 2023 | Markus Moeller | Initial release |
1.1 | Sep 26, 2023 | Markus Moeller | SharePoint CSOM access as alternative added |
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.
- Clone the repository
git clone https://github.com/mmsharepoint/tab-office-offer-creation-csharp.git
- Open tab-sso-graph-file-conversion.sln in Visual Studio
- Perform first actions in GettingStarted.txt (before hitting F5)
- This should register an app in Azure AD
- Ensure there is an app
- with redirect uri https://localhost/blank-auth-end.html
- SignInAudience multi-tenant
- with client secret
- with delegated Graph permissions Sites.ReadWrite.All and SharePoint permission AllSites.Write
- With exposed Api "access_as_user" and App ID Uri api://localhost/
- With the client IDs for Teams App and Teams Web App 1fec8e78-bce4-4aaf-ab1b-5451cc387264 and 5e3ce6c0-2b1f-4285-8d4b-75ee78787346
- Find/Add the app registration ClientId, ClientSecret to your appsettings.json (or a appsettings.Development.json)
- Find/Fill OAuthAuthority with https://login.microsoftonline.com/_YOUR_TENANTID_
- Grant admin consent to the given permissions in the app registration
- Now you are good to go to continue in GettingStarted.txt with hitting F5 (You can also select an installed browser in the VS menu
- Create the content-type for your offers in a site / default document library of your choice (described here)
- With PnP-PowerShell for instance call the deploy script with your site url as parameter
.\templates\deploy.ps1 -siteUrl <YourFullSiteUrl>
- Put the same site url to your appsettings.json under PnPCore:Sites:DemoSite:SiteUrl
- With PnP-PowerShell for instance call the deploy script with your site url as parameter
- Potentially decide if to use Microsoft Graph or SharePoint CSOM by setting "UseGraph" to "false" or "true" in appsettings.json
This is a Teams personal Tab app to act as a Microsoft 365 across application (Teams, Outlook, Office)
- Using SSO with Teams
- Using O-B-O flow secure and totally in backend to retrieve and store data via Microsoft SharePoint
- Using Microsoft Graph to copy template to document and manipulate metadata
- As alternative using SharePoint PnP.Core to copy template to document and manipulate metadata
- Extend Teams apps across Microsoft 365
- Use FluentUI Blazor components FluentTextField, FluentSelect, FluentNumberField, FluentProgressRing, FluentTextArea