Provider Hosted App (PHA) application errors (TLS errors and 401 errors).

Provider Hosted App (PHA) application errors (TLS errors and 401 errors).

Am a keen follower of Microsoft's SharePoint Blog and proud to provide this direct from the Microsoft Tech Community:

Note: Please take extreme caution before making any changes in Production. Make sure you test the changes in a test environment first.


Recently due to a spate of updates to various endpoints in SharePoint, Azure, and the AAD auth login endpoints, we are seeing projects compiled with version of .NET before 4.6 cause TLS errors which don’t always show as TLS errors in the PHA.


The error messages The underlying connection was closed” or “System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host” you are seeing is mainly due to deprecation of TLS1 1.0 & 1.1. Please see:

Preparing for TLS 1.2 in Office 365 and Office 365 GCC – Microsoft 365 Compliance | Microsoft Docs

Enable TLS 1.2 on servers – Configuration Manager | Microsoft Docs

TLS 1.0 and 1.1 deprecation – Microsoft Tech Community


The updates were communicated in the Office 365 message center.

  • MC218794 – July 17, 2020 | TLS 1.0 and 1.1 retirement date in Office 365 to be October 15, 2020

  • MC240160 – Feb 16, 2021 | Reminder: Disabling TLS 1.0 and TLS 1.1 in Microsoft 365


If the PHA app web is hosted on a remote physical server, then.


3 ways you can resolve the error:

1] You can either update applications web.config file and update httpRuntime to 4.7 example: 

<httpRuntime targetFramework=”4.7″/>




2] You can add the following registry key settings on your remote app web server(s):


“SystemDefaultTlsVersions” = dword:00000001

“SchUseStrongCrypto” = dword:00000001

Note: You may need to restart your server(s)




3] Add this one line of code above each instantiation of the ClientContext in your code:

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;

Note: Extensive code updates will be needed.


If the App web is hosted on Azure, then.

Log into the Azure portal ( with an account with admin rights on the web app in question.

Once you open the App Services and select the web app hosting the PHA site, click on the App Service Editor (Preview).



This will open the editor, then select the web.config file and change the circled targetFramework attribute to 4.7 preferably (any setting higher than 4.6 will work too). Note the status in the upper right will say ‘DIRTY’ for a bit, then it should auto-save and change back to ‘SAVED’-



At this point you should be set, refresh the page with the PHA and all should be good.


if the application is a Azure WebJob, then.

You will have to re-target/re-compile the app to 4.6+ (recommend 4.7) and re-upload it to fix it.

You can’t use the config file for the exe to re-target the same way we can for a web application.

The above is kindly provided by the Microsoft Tech Community!

GlobalCon5 – three days of sessions and workshops

GlobalCon5 – three days of sessions and workshops

Am a keen follower of Microsoft's SharePoint Blog and proud to provide this direct from the Microsoft Tech Community:

Let’s give GlobalCon a collective high-5 and make it GlobalCon5. Hey, don’t leave me hangin’! I’m pleased to be joining in the fun along with a wonderful lineup of speakers and depth of content.


Yes, the Collab 365 team is at it again. I don’t think they ever stopped. They have been paving the way forward for virtual events for some time, and this go around won’t disappoint. They’re planning great, unique training, presented by world-class trainers and new content – across three days. It’s easy to plug in no matter where you live, engaging Q&A throughout, with much to take with you and learn at your own pace.


GlobalCon5: “I feel the need, the need for speed!” (that’s the kind of high-5 I’m talkin’ about) 😉



GlobalCon5 – March 16-18, 2021 (online training)GlobalCon5 – March 16-18, 2021 (online training)

Microsoft 365 is big and changes often – the GC5 team could run a conference every week! Each session brings a fresh new perspective. You’ll learn the latest to keep your skills fresh. GlobalCon5 covers Teams, Power Platform, SharePoint, and everything else stacked into Microsoft 365.


Below is a quick view of the sessions by day – including my kickoff session:



Shout out to community “high-5’ers” Helen Jones, Mark Jones, and the #GlobalCon5 crew who are navigating this conference by day and night, supporting, and promoting the knowledge and expertise that reaffirms this: Microsoft 365 has the best tech community in the world – one that spans the globe.


See you there, Mark

The above is kindly provided by the Microsoft Tech Community!

Help employees transition to hybrid work using a new SharePoint site template and end-user training

Help employees transition to hybrid work using a new SharePoint site template and end-user training

Am a keen follower of Microsoft's SharePoint Blog and proud to provide this direct from the Microsoft Tech Community:

The pandemic has fundamentally changed how we all live, learn, and work. As we begin to recover from the pandemic and plan our return to the office, many organizations are rethinking the future of work:


  • Over 80% of managers surveyed expect to have more flexible work from home policies post-pandemic.

  • More than 70% of the employees and managers reported a desire to continue working from home at least part-time.

Source: Harris Poll survey commissioned by Microsoft, May 2020


At Microsoft, we believe the future of work is hybrid. The essence of hybrid work is extreme flexibility, in terms of where and when people work. Organizations are creating new policies that empower employees to spend some portions of their week working from home, as well as flexible working hours. While certain measures may need to be put in place to optimize hybrid workplace functions, there is no turning back when it comes to the future of work. A large majority of people prefer a mix of remote-work and office-work instead of a return to the traditional work model, or permanent all-remote work.


As we return to the workplace, moving to a hybrid work model will not just be about continuing the great work-from-home experiment many of us have been participating in for almost 12 months now. We will need to change our behavior by developing new skills and habits to help us stay healthy, finding new ways to engage and stay connected as we adopt this new way of working. It is going to take a collective effort for organizations to make a successful transition to a hybrid workplace.


There are big changes ahead for those of us moving to a hybrid work model. Like any organizational change initiative, we must be thoughtful about how we guide people through the journey. If not, organizations face risks such as decreased productivity, increased turnover, or employees that are just not engaged.


To help our customers lead their organization’s transition to a hybrid workplace we have launched a SharePoint site template on the SharePoint look book called the Workplace transformation site as well as new end-user training to help employees learn new habits and skills that support hybrid work.


Workplace transformation site


The Workplace transformation site template helps organizations:


  • Inspire employees on the new possibilities the hybrid workplace offers.

  • Provide employees with the information, resources, and support they will need to buy-in and adopt the new way of working.

  • Prepare employees for a successful transition to a hybrid workplace with a change journey checklist and quick tips.

The Workplace transformation site features:


  • A fully configured and customizable hybrid work transformation site built on SharePoint communication sites: The Workplace transformation site brings together information architecture, pre-populated content, site design and webparts to help inform and support employees through the transition to a new way of working. The site can be customized to add your organization’s content and to align with its look and feel.

  • Hybrid work checklist: Any organizational change initiative can be stressful for employees. Help your employees through the change process by providing them a curated change journey checklist. Guide employees through organizational changes with a customizable activity list of tasks such as required training courses and learning events.

  • Inspirational help content: Understanding how the day-to-day workplace will change in the new hybrid model is key to helping onboard employees. The Workplace transformation site includes “quick tip” guides for employees and managers, and a week in the hybrid workplace content.

  • Support resources: As employees’ transition to a hybrid work model, they will need multiple levels of support from self-service support like FAQs to one-on-one help from champions. The hybrid work transformation site includes a champions program overview page, a Yammer community web part, and pre-populated FAQs to help support employees.

  • Mobile-ready: The Workplace transformation site can be easily accessed on mobile devices so employees can continue their hybrid work transition journey from wherever they may be working.

Hybrid work end user training

To help employees develop new hybrid workplace habits and discover new tools that set them up for success, we have developed new end-user training content based on Microsoft research insights. The training content is focused on collaboration and meetings in a hybrid world, using asynchronous collaboration methods, well-being, productivity, security, and data protection. Embed hybrid workplace training content into your Workplace transformation site using Microsoft 365 learning pathways – a free, on-demand training solution. Microsoft 365 learning pathways can be easily deployed in your Microsoft 365 tenant environment and can be used to customize new hybrid work training playlists to suit your organization, along with other Microsoft-maintained product training playlists.   




Learn more about the Workplace transformation site template and new end user training.  Provision the Workplace transformation site to your tenant today and customize it to help your colleagues transition to a new way of working.


Frequently asked questions:


Question: What are the requirements for installing the Workplace transformation site into my tenant environment?


Ensure SharePoint Online is enabled in your environment.

The individual that will provision the hybrid work transformation site must be the tenant admin.


Question: How long will it take to install the site in our tenant environment?

Answer: Based on our testing of the installation, it should take 10 minutes or less. Individual tenant configurations could cause differences in installation duration. This does not include time to customize the site to your organizations’ requirements.


Question: What customization options are available for the Workplace transformation site?

Answer: The site can be fully customized to fit the needs of your change management project, users, and organization. Review the Workplace transformation site template provisioning and customization guidance before getting started.

The above is kindly provided by the Microsoft Tech Community!

Microsoft 365 PnP Weekly – Episode 112

Microsoft 365 PnP Weekly – Episode 112

Am a keen follower of Microsoft's SharePoint Blog and proud to provide this direct from the Microsoft Tech Community:



In this installment of the weekly discussion revolving around the latest news and topics on Microsoft 365, hosts – Vesa Juvonen (Microsoft) | @vesajuvonen, Waldek Mastykarz (Microsoft) | @waldekm, are joined by Ed Everett, Principal Group Program Manager from Microsoft, leading the platform extensibility efforts for OneDrive and SharePoint areas. 


The trio talk about continued integrations of infrastructure and app platform across Microsoft 365, including still tighter integration with Microsoft Teams, Microsoft Graph, Power Platform, resource-based consent for app development, several SPFx updates, and more on forms customization.  


The session was recorded on Monday, February 1, 2021.



Did we miss your article? Please use #PnPWeekly hashtag in the Twitter for letting us know the content which you have created. 


As always, if you need help on an issue, want to share a discovery, or just want to say: “Job well done”, please reach out to Vesa, to Waldek or to your Microsoft 365 PnP Community.


Sharing is caring!


The above is kindly provided by the Microsoft Tech Community!

Designing SharePoint sites with beautiful headers

Designing SharePoint sites with beautiful headers

Am a keen follower of Microsoft's SharePoint Blog and proud to provide this direct from the Microsoft Tech Community:

One of my favorite quotes about design comes from Mad Men. This quote says a lot about how we think of site headers for SharePoint Online and how we create layouts.


“Make it simple, but significant.” – Don Draper, Mad Men, Season 4, Episode 6, “Waldorf Stories”


Hand holds open a color swatch book displaying multiple colors.Hand holds open a color swatch book displaying multiple colors.



Branding your site header is an easy way to provide impact and expression to your SharePoint sites. Over the years we have heard great feedback from our customers that they would like more options for site headers. With this feedback in mind, we recently introduced 2 new site header layouts – Minimal and Extended. But this is not all we heard, so we added more header configuration options giving you more control over the elements in your headers. These simple and small changes can have a big impact on the look of your site. Each header can be used for different reasons and we want to go through a few of these options and recommendations with you.


By combining site logos, site headers, footers, and themes you can make striking changes to emphasize your brand within each site. Picking the right combination of options amongst the site header layouts and configuration options can emphasize or minimize the impact and focus of the brand and content.


When you begin to think about your site header, it is important to first understand what information is available to be included in the header. With this knowledge you can make informed choices about the layout and configuration options to truly make your brand shine on each site.


Content can be included in site headers:



Site Type


Site Logo

Larger logo that can be non-square and transparent based off design uploaded


Size: 192 px width 64 px height

Format: PNG, JPEG, SVG (svg not allowed for Group connected sites)

Site Logo Thumbnail

A square logo thumbnail that is used if no site logo is uploaded or in places that a square format is required


This element is required.


Size: 64 px width; 64 px height

Format: PNG, JPEG, SVG (svg not allowed for Group connected sites)

Site Title

Text displayed for the site title.


This element is required.


Avoid repeating text in the site logo and site title if both are desired to be displayed

Extended Layout Site Logo

The extended header layout has an extended site logo width.


Size: 300px wide x 64px height

Format: jpeg, png, svg

Extended Layout Background image

A new background image that can be utilized with the extended header.


Size: 2560px wide x 164px height

Format: jpeg, png

Horizontal Site Navigation

Navigation specific to the site in either Mega Menu or Cascading format



Vertical Site Navigation/Quick Launch

Navigation specific to the site that appears on the left side of the site



Site Label (4 types)


1. Site Classification sets a label on a SharePoint site to protect and identify the content within the site.

2. Sensitivity labels are used across containers and can be applied to SharePoint sites as well as other Microsoft 365 products consistently. 

3. Information Barriers indicator if configured and applied to the site.

4. Privacy Setting is a setting applied to the M365 Group for the site.


The type of site label is defined by what is configured for your tenant and type of site. This can vary from site to site based off your organizations policies.



An indicator of whether the user has followed the site or not.





A quick action icon to easily share the site with other users.

All *except private channel sites connected to Teams



A count of the current members of a site/group are displayed if available.

Group connected team sites *except private channel sites connected to Teams


Multilingual Picker/Language


A language selector for the page if multilingual has been configured for the site.

All where configured


With all these potential items that could be included in your site header, you will need to decide for each site how you want to present the content and intended use of your site. With these factors in mind, you can make the right choices for layout and configuration. For many sites, the focus might be the brand or showcasing a new concept, while for others the focus might be the contents of the site and information on the pages. Each header layout can assist in promoting the intent of your site and highlight your brand at the same time.


Let us start with the common header elements, once you determine the purpose of your site and select the theme that you wish to utilize, you can look towards the site header to provide information and impact for the site. The theme selected is an important related factor for your site header as it will determine the colors utilized in the header. You will make these selections through the Change the Look panel accessed through the Settings gear.



An expanded view of the Change the Look panel for Headers.



The site logo is one of the first visual elements that a user will interact with and view on your site. You can use this logo to highlight your brand, create a wayfinding element, or provide information about the site. In the past you could utilize a non-square transparent logo or the provided square icon.


However, we heard feedback that many people would like to utilize the non-square transparent logo and control how their site logo appeared in the square aspect ratio utilized in some SharePoint features. With this in mind, we are introducing the site logo thumbnail. The site logo thumbnail is required for every site and upon site creation we provide an icon that is autogenerated using an Office color and the initials of the site title.


In addition to the site logo thumbnail, we also have the site logo. This optional logo allows the upload of a non-square, transparent logo that will be displayed in the site header and other SharePoint features not utilizing the square aspect ratio.


The next visual element that a user will interact with in the site header is the site title. The site title is a required element in a SharePoint site, but is often repeated as text displayed within the site logo. As we heard from our customers, this repetition has a negative impact to the users. With the understanding of the value of having a text site title for uses within SharePoint, we have included the option of hiding the visibility of the site title text in the site header.


Once you have made decisions about the site title and the site logo, you will want to shift your attention to exactly how these elements will be presented on the site. The site header layout options will give you multiple options for combining all the possible elements into a single presentation. SharePoint now has 4 different site header layout options, each with advantages and potential visual impact for your site.



Minimal Header


SharePoint Minimal site headerSharePoint Minimal site header


The Minimal Header layout option is our smallest site header and will work best for sites where you want to provide a clear focus on the content or the hub navigation. This header utilizes the smallest height and the smallest site logo size possible. With the minimal nature of this header, it provides the least visual weight and impact on your site.


To best create a minimal header, we have minimized the content that is included in this header layout, you will find additional content in the overflow menu to the right of the header, including the multilingual language selector. The minimal header should be used very strategically on sites where this restricted content in the header will work best.


It is important to note that if you choose to use this minimal header layout for a multilingual sites the language selector is included in the ellipsis overflow menu.

Compact Header


SharePoint Compact site headerSharePoint Compact site header


If you use the site header layout of Compact, you will see an increase in the height of the site header and a single line of content across the header area. This layout option is best suited for most of your communication and team sites, allowing you to optimize the space afforded for your site content with a smaller height that includes the most information. Due to the flexibility of the compact header, it is the default header layout provisioned with each site.


With the compact layout you can provide additional wayfinding and identifying information by uploading a site logo. The site header background color, you can also add visual impact to your header with a header background color from your selected site theme.

Standard Header


SharePoint Standard site headerSharePoint Standard site header


The standard header layout increases the height of the site header and splits the site information into multiple lines for display purposes. This header layout is a good choice if you have a site not connected to a hub and have additional room to allow for the larger height.


You can also optimize the standard site header with a header background color from your site theme and site logo to highlight the site and give emphasis to site specific wayfinding.

Extended Header


SharePoint Extended site headerSharePoint Extended site header


The extended header layout is the largest layout option that introduces a secondary area to provide a separate area for a background image or color. This layout should be utilized for sites that want to provide impact or become a showcase site for your organization brand or concept within your organization. For additional visual weight we have increased the maximum width site logo that can be included to provide additional impact and introduced the ability to align the logo left, center or right within the header. The site information and navigation (depending on site type) are moved below to a separate site theme colored bar for increased accessibility on these items.


There are some notable exceptions in behavior based on site type for the extended header. If your site is a Hub site and has been designated as Home, and you are utilizing the Extended Header, the site navigation will be removed. For these Hub + Home sites the Hub navigation bar will move to the bottom of the background image as the only navigation presented. If you are utilizing a team site template, you will notice that the navigation will continue to be presented on the left as the quick launch and not in the site header.


As you begin to explore using the extended header, there are a few design recommendations for how you should think about and design the extended header background images. These images will need to scale to fit both wide and small screens, without conflicts and introducing accessibility issues for the site logo and site title. We encourage you to think about these header background images in 3 distinct categories:

Brand Pattern:

By utilizing a pattern that is related to your brand in either shapes or colors, you can create a design that is visually appealing, while maintaining the appropriate open spaces for the site logo to avoid conflicts and potential accessibility issues with the site logo. These patterns will add great visual detail to your site.


Tips for creating brand patterns for your site headers:

  1. Use colors that are a part of your brand and related to the site theme.

  2. Repeating shapes, colors, and details can provide interest and simplicity.

  3. Keep your pattern simple.

Brand Pattern samples for extended SharePoint site headerBrand Pattern samples for extended SharePoint site header

Brand Photography:

A picture speaks a thousand words as they say, however photography is especially challenging in reduced height spaces like the site header that will need to scale for large and small width screens. Utilizing photography tied to your brand allows you to be specific on the items included in the photographs so that it relates to the content within the site, while also controlling the amount of visual focal draws within the image to keep clear focus on the site logo and site title.


Tips for picking photography for your site headers:

  1. Avoid the introduction of numerous visual elements.

  2. Keep colors to a minimum.

  3. Be aware of color contrasts.

  4. Provide clear open space for your site logo and site title.

Brand photography samples SharePoint extended site headerBrand photography samples SharePoint extended site header

Brand Illustration:

By creating an illustration for your site header, you can tie the content of the header to the visual elements of your image in a noticeably clear way. By custom tailoring an illustration for your brand and the site contents, you are able to increase the connection impact of your visual elements to the subject of the site.


Tips for brand illustrations in your site header:

  1. Minimize colors utilized in your illustration.

  2. Create or use illustrations that reinforce the content or focus of your site.

Brand Illustration samples SharePoint extended site headerBrand Illustration samples SharePoint extended site header



Brand can play a vital role in your portals and sites; these options will allow you to create the perfect introduction of your site to your users. As you can see, all these changes to site headers really took Don Draper’s advice to heart. While they are simple, they are significant.


No matter if you want to make a big splash, or provide minimal interruption, you cannot go wrong with any of these site header options. The additional configuration options for the site title and site logo thumbnail allow you to control the presentation of the visual and text elements for your site and brand throughout the SharePoint features. With these great options for site headers, we are excited to see the great ways that you use each of these layouts to enhance your SharePoint portals and experiences.


Want to learn even more about designing beautiful SharePoint sites, watch a full session in the Video



The above is kindly provided by the Microsoft Tech Community!

Application Guard for Office is now generally available!

As of today, Application Guard for Office is now generally available.


Files from the internet and other potentially unsafe locations can contain viruses, worms, or other kinds of malware that can harm your users’ computer and data. To help protect your users, Office opens files from potentially unsafe locations in Application Guard, a secure container that’s isolated from the device through hardware-based virtualization. When Office opens files in Application Guard, users can securely read, edit, print, and save those files without having to re-open files outside the container. This feature will be off by default.


Here is the installation guide to get started:
Application Guard for Office 365 for admins – Office 365 | Microsoft Docs


Customers will receive a Message center post on Wednesday, 1/27/2021. Microsoft 365 Roadmap Featured ID is 67101. Application Guard for Office is only available to organizations with a Microsoft 365 E5 or Microsoft 365 E5 Security license.

Microsoft 365 PnP Weekly – Episode 110

Microsoft 365 PnP Weekly – Episode 110

Am a keen follower of Microsoft's SharePoint Blog and proud to provide this direct from the Microsoft Tech Community:



In this installment of the weekly discussion revolving around the latest news and topics on Microsoft 365, hosts – Vesa Juvonen (Microsoft) | @vesajuvonen, Waldek Mastykarz (Microsoft) | @waldekm, are joined by Erwin van Hunen (Valo Intranet) | @erwinvanhunen – MVP, Father of PnP PowerShell, and Lead Architect at Valo Intranet in Sweden.


How do you end up owning a PnP open source project?  Start by making and sharing something that makes your own life easier.  In Erwin’s case, create a little PowerShell module in 2014.   Now, 60 Million PowerShell Cmdlets are executed each day.  Subsequent discussion focuses on who, why, where, how to use PnP PowerShell.  PnP PowerShell can be used for Microsoft Teams and Planner in addition to SharePoint.  Covered off on connectivity, authentication, supportability, roadmap, and on how PnP PowerShell and Microsoft Graph PowerShell are complementary.  Future and present – a multi-Platform PnP PowerShell for Windows, Mac, Linux, Raspberry Pi, Azure Functions, Azure Automation.  PnP.PowerShell v1.00 is releasing this week thanks to contributions from many PnP community members.


This episode was recorded on Monday, January 18, 2020.



Did we miss your article? Please use #PnPWeekly hashtag in the Twitter for letting us know the content which you have created. 


As always, if you need help on an issue, want to share a discovery, or just want to say: “Job well done”, please reach out to Vesa, to Waldek or to your Microsoft 365 PnP Community.


Sharing is caring!

The above is kindly provided by the Microsoft Tech Community!

Pull on your SharePoint sweater backgrounds for Microsoft Teams

Pull on your SharePoint sweater backgrounds for Microsoft Teams

Am a keen follower of Microsoft's SharePoint Blog and proud to provide this direct from the Microsoft Tech Community:

‘Tis the season! Did you grab a Microsoft-themed sweater? Sold out? Don’t worry. We’ve created three SharePoint-themed winter holiday sweaters to back you up – in Microsoft Teams, or to use as wallpaper on your desktop.


Make your productivity festive and intranet’ty! Grab the png’s and follow the ‘how to’ link below.



Download SharePoint holiday sweater background – abstract.



Download SharePoint holiday sweater background – Hanukkah.



Download SharePoint holiday sweater background – Christmas.


Learn how to change your background for a Microsoft Teams meeting.


Special thanks to our design team for creating the fun.


View more Microsoft background and wallpapers.


Stay safe and happy holidays,
Wenvi Hidayat

The above is kindly provided by the Microsoft Tech Community!

How to create Microsoft 365/O365 Group with Teams using Graph API.

How to create Microsoft 365/O365 Group with Teams using Graph API.

Am a keen follower of Microsoft's SharePoint Blog and proud to provide this direct from the Microsoft Tech Community:

Seems creating Microsoft 365/O365 Group via CSOM not working. If you try to use SharePoint Client Side Object Model(CSOM) you might run into following exception:


Message=The web template GROUP#0 is not available for sites on this tenant.
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()



We have to use Graph API and this sample should help get started. ROPC authentication is used. Delegated authentication should also work but not tested.


Setup Steps:
1] Setup Native App in AAD.
2] Copy the App Id as you will need to provide it later in the code.
3] Provide following Delegated Graph API permissions.

Groups.ReadWite.All, Directory.ReadWrite.All, openid, Team.Create, User.Read 
4] Grant Admin consent.
5] See screenshot below:



6] Sample C# code to Create Microsoft 365/O365 Group with Teams:



using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Text;

namespace CreateGroupMultiGeo
class Program
static async Task Main(string[] args)
string clientId = “50168119-04dd-0000-0000-000000000000”;
string email = “”;
string passwordStr = “password”;

var req = new HttpRequestMessage(HttpMethod.Post, “”)
Content = new FormUrlEncodedContent(new Dictionary<string, string>
[“resource”] = “”,
[“grant_type”] = “password”,
[“client_id”] = clientId,
[“username”] = email,
[“password”] = passwordStr,
[“scope”] = “openid”

HttpClient httpClient = new HttpClient();

var res = await httpClient.SendAsync(req);

string json = await res.Content.ReadAsStringAsync();

if (!res.IsSuccessStatusCode)
throw new Exception(“Failed to acquire token: ” + json);
var result = (JObject)JsonConvert.DeserializeObject(json);
//create a group

HttpClient httpClientGroup = new HttpClient();

httpClientGroup.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(“Bearer”, result.Value<string>(“access_token”));

// Create a string variable and get user input from the keyboard and store it in the variable
string grpName = “MultiGeoGraphAPIGrp1″;

string contentGroup = @”{
‘displayName’: ‘” + grpName + @”‘,”
+ @”‘groupTypes’: [‘Unified’],
‘mailEnabled’: true,
‘mailNickname’: ‘” + grpName + @”‘,”
+ @”‘securityEnabled’: false,
‘owners@odata.bind’: [‘’]

var httpContentGroup = new StringContent(contentGroup, Encoding.GetEncoding(“utf-8”), “application/json”);

var responseGroup = httpClientGroup.PostAsync(“”, httpContentGroup).Result;

var content = await responseGroup.Content.ReadAsStringAsync();

dynamic grp = JsonConvert.DeserializeObject<object>(content);



//create a Team

HttpClient httpClientTeam = new HttpClient();

httpClientTeam.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(“Bearer”, result.Value<string>(“access_token”));

//create a team

string contentTeam = @”{
‘memberSettings’: {
‘allowCreateUpdateChannels’: true
‘messagingSettings’: {
‘allowUserEditMessages’: true,
‘allowUserDeleteMessages’: true
‘funSettings’: {
‘allowGiphy’: true,
‘giphyContentRating’: ‘strict’

var httpContentTeam = new StringContent(contentTeam, Encoding.GetEncoding(“utf-8”), “application/json”);

var responseTeam = httpClientTeam.PutAsync(@”” + + @”/team”, httpContentTeam).Result;





The above is kindly provided by the Microsoft Tech Community!

Deploy Microsoft 365 Apps to remote workers

Deploy Microsoft 365 Apps to remote workers

This blog post will address the enterprise IT admin’s challenge on how to deploy Microsoft 365 Apps to remote workers without saturating the company’s VPN connections. It will show you how to implement a tactical approach which allows an IT admin to stay in control and quickly relief the pain of VPN congestion by offloading content distribution to the Microsoft Content Delivery Network (CDN). Maybe you are in the process of moving off legacy versions of Office and want to keep the pace with e.g. the Office 2010 end-of-support approaching fast. There are multiple strategic solutions available (e.g. Intune and Windows Autopilot), but for now we focus on a quick fix.


Overview of blog post series

This blog post is part of a series, which is brought to you by the Office Rangers Team at Microsoft, a group of senior deployment experts. The series provides guidance on how to address scenarios around working-from-home across the lifecycle of an Microsoft 365 Apps installation:


We hope this will help you to minimize the impact of deploying, servicing and managing Microsoft 365 Apps on your own network and your user’s VPN connections.


The Concept

With the approach described below, we want to achieve two things:

  • Keep IT admins in control what happens when by continue using your enterprise management solution like Microsoft Endpoint Configuration Manager (formally known as System Center Configuration Manager (SCCM))
  • Offloading the content distribution to Microsoft’s CDN to allow remote user to leverage their local internet connection instead of pulling large source files from your ConfigMgr Distribution Points over VPN connections

We will walk you through the process on how to adjust an existing Microsoft 365 Apps deployment package for a hybrid approach, update your sources and ensure that the source file download will bypass your VPN.


Step 1 – Adjust your deployment package

To allow remote users to leverage their local internet connection for source file access, we have to remove the source files from the Configuration Manager application. Navigate to the folder which is holding your software sources, locate the “office” folder and delete it:


In the above example, 11 Language Packs were included in the deployment package, bumping the size up to 6+ gigabytes. Keep the setup.exe as well as any configuration files located in the folder. This reduces the size of your deployment package to less than 10 megabyte. That’s a huge saving on your VPN connections.

In case you don’t have an Microsoft 365 Apps installation package yet, you can use the built-in wizard to create one. Maybe you want to adjust the handling of languages, instead of hard-coding those you might want to use MatchOS or MatchPreviousMSI. After that, apply the steps above.


Step 2 – Update the content sources

If your application was already synced to Distribution Points, those still have the larger package cached. Navigate to Software Library > Application Management > Applications, select your application, switch to the Deployment Types Tab, right-click the appropriate entry and click Update Content.


This will re-sync any changes to your Distribution Points, so those will now also have the smaller deployment package ready to sync to devices.


Step 3 – Verify VPN configuration and deploy

Once a client has received the smaller deployment package through ConfigMgr and kicks off the installation, it will download the source files directly from the Microsoft CDN. It is important to ensure that your devices can actually reach out to those endpoints directly and don’t backhaul through the VPN tunnel. We published guidance on how to enable so-called VPN split-tunneling, the endpoints relevant for Microsoft 365 Apps source file download are listed at Office 365 URLs and IP address ranges as entry #92.

If you already have an active deployment of the newly-updated package, clients will start receiving it after the Distribution Points have finished syncing the changes. If you want to start with a fresh deployment, just follow the regular guidelines in your organization.


Step 4 – Leverage peer caching to reduce on-prem traffic (optional)

The following step is not required, but highly recommended. In order to use the same deployment package for your remote and on-premises workers, we recommend to configure and enable Delivery Optimization for Office in combination with Connected Cache. This will enable your on-prem devices to share content which is no longer included in the deployment and greatly reduce the load on your corporate internet connection.



Q: We usually controlled which build is installed by embedding the matching source files. How can I control this now?
A: By default, setup will fetch the latest build available for the specified update channel. You can use the version attribute in the configuration file to specify a build. This might be important if your organization is wants to deploy the older SAC feature release.


The Authors

This blog post is brought to you by  from the Microsoft 365 Apps Ranger Team at Microsoft. Feel free to share your questions and feedback in the comments below.