Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional tenant settings from api/SPOInternalUseOnly.TenantAdminSettings #3902

Merged
merged 8 commits into from
May 29, 2024

Conversation

reshmee011
Copy link
Contributor

@reshmee011 reshmee011 commented Apr 21, 2024

Before creating a pull request, make sure that you have read the contribution file located at

There are additional settings available from https://contoso-admin.sharepoint.com/_api/SPOInternalUseOnly.TenantAdminSettings. Adding those to Get-PnPTenant will make it easier to retrieve these properties for governance or inventory purposes.

Original idea was from Tobias Maestrini and I helped implement the retrieval of these properties.

Type

Three new files to support the cmdlet
documentation\Get-PnPTenantInternalSetting.md
src\Commands\Model\SPOTenantInternalSetting.cs
src\Commands\Admin\GetTenantInternalSetting.cs

What is in this Pull Request ?

Additional tenant properties available from /_api/SPOInternalUseOnly.TenantAdminSettings

@tmaestrini
Copy link
Contributor

Hey @reshmee011, thank you very much for your support! :) See my PN in X chat regarding this. 💪

@gautamdsheth gautamdsheth force-pushed the tenantsettingsinternaluse branch 2 times, most recently from 94f93e8 to 4c4a011 Compare April 27, 2024 19:54
@reshmee011 reshmee011 closed this May 27, 2024
@reshmee011
Copy link
Contributor Author

Sorry accidentally closed while trying to fix the build issues and refactoring the code to be a separate cmdlet instead

@reshmee011 reshmee011 reopened this May 27, 2024
@gautamdsheth
Copy link
Collaborator

@reshmee011 - can you change to singular InternalSetting ? PS doesn't allow plurals in cmdlet names.

@reshmee011
Copy link
Contributor Author

@gautamdsheth : I have update it to be singular internalsetting. Thanks for the review.

Copy link
Collaborator

@gautamdsheth gautamdsheth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, one more change !
Need to replace Newtonsoft.Json with System.Text.Json, let me know if you need help.

using Microsoft.Online.SharePoint.TenantAdministration;
using Microsoft.Online.SharePoint.TenantManagement;
using Microsoft.SharePoint.Client;
using Newtonsoft.Json;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, sorry missed this !

We use System.Text.Json for serializing/de-serializing JSON.

Can you please remove the Newtonsoft.Json reference ? We also need to use JsonPropertyName instead of JsonProperty. Let me know if you need help here.

@reshmee011
Copy link
Contributor Author

@gautamdsheth : I have updated to use "System.Text.Json;". Thanks very much for the review.

@gautamdsheth gautamdsheth merged commit 1c46d81 into pnp:dev May 29, 2024
5 checks passed
@gautamdsheth
Copy link
Collaborator

Merged it , thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants