PowerShell utility module for setting up ArcGIS connection strings

516
0
10-31-2022 11:25 AM
RaajRaaj
Esri Contributor
1 0 516

The first step is to install the Microsoft.Graph module by running the command shown below in the SharePoint online management shell (run as “administrator”). Use the “Force” parameter in the command to overwrite the existing version of Graph module.

 

 

Install-Module -Name Microsoft.Graph

 

 

 

RaajRaaj_28-1667240659186.png

 

 

The next step is to install the ArcGIS.Microsoft365 module. Run the following cmdlet to install the module.

 

 

Install-Module -Name ArcGIS.Microsoft365

 

 

The next step is to install the ArcGIS.Microsoft365 module. Run the following cmdlet to install the module.

 

RaajRaaj_17-1667240248439.png

 

Sign-in to Azure in the PowerShell command line session with the following cmdlet before using any ArcGIS.Microsoft365 PowerShell module functions:

 

Connect-MgGraph -Scopes "Organization.Read.All"

 

 

RaajRaaj_18-1667240286194.png

 

Note: The tenant admin will be prompted to sign-in when running the above cmdlet.

Once signed-in and the connection to Graph API is established, the tenant administrator can now configure a list of ArcGIS connections for the map authors within the organization. Once the list of ArcGIS connections is configured, members within the organization can pick the ArcGIS connection from the drop-down, which is now part of the new sign-in experience in ArcGIS for SharePoint.

RaajRaaj_19-1667240306453.png

 

Before running the PS commands to configure the ArcGIS connections, the SharePoint tenant admin has to approve the Microsoft Graph API access available under the SharePoint admin center.

RaajRaaj_22-1667240343150.png

 

RaajRaaj_20-1667240306459.png

 

 

RaajRaaj_23-1667240365241.png

 

If you need to update the title for the ArcGIS connection string, please run the  command below:

RaajRaaj_24-1667240397183.png

 

 

RaajRaaj_25-1667240406768.png

To remove any of the existing connection strings, please use the command below:

RaajRaaj_26-1667240422836.png

To view all existing strings, use the command below:

RaajRaaj_27-1667240463304.png

 

Thus, the SharePoint tenant Administrator can create, update, remove ArcGIS connection strings which can be used in the ArcGIS for SharePoint app. This utility will be particularly useful when an organization has multiple ArcGIS Online or ArcGIS portal organizations or if they want their new organization members to be able to pick the connection string from a drop-down instead of having to share the URLs with their organization members and then the members having to manually enter their ArcGIS Online or ArcGIS portal URL.