Interface IMicrosoft365Admin
- Namespace
- PnP.Core.Admin.Model.Microsoft365
- Assembly
- PnP.Core.Admin.dll
Microsoft 365 Admin features
public interface IMicrosoft365Admin
Methods
AccessTokenHasRole(string)
Checks if the current access token holds the requested role
bool AccessTokenHasRole(string role)
Parameters
rolestringRole to check for
Returns
- bool
True if the token has the role, false otherwise
AccessTokenHasRole(string, string)
Checks if the provided access token holds the requested role
bool AccessTokenHasRole(string accessToken, string role)
Parameters
Returns
- bool
True if the token has the role, false otherwise
AccessTokenHasRoleAsync(string)
Checks if the current access token holds the requested role
Task<bool> AccessTokenHasRoleAsync(string role)
Parameters
rolestringRole to check for
Returns
AccessTokenHasScope(string)
Checks if the current access token holds the requested scope
bool AccessTokenHasScope(string scope)
Parameters
scopestringScope to check for
Returns
- bool
True if the token has the scope, false otherwise
AccessTokenHasScope(string, string)
Checks if the provided access token holds the requested scope
bool AccessTokenHasScope(string accessToken, string scope)
Parameters
Returns
- bool
True if the token has the scope, false otherwise
AccessTokenHasScopeAsync(string)
Checks if the current access token holds the requested scope
Task<bool> AccessTokenHasScopeAsync(string scope)
Parameters
scopestringScopee to check for
Returns
AccessTokenUsesApplicationPermissions()
Checks if the current access token uses application permissions
bool AccessTokenUsesApplicationPermissions()
Returns
- bool
True if using application permissions, false otherwise
AccessTokenUsesApplicationPermissions(string)
Checks if the provided access token uses application permissions
bool AccessTokenUsesApplicationPermissions(string accessToken)
Parameters
accessTokenstringAccesstoken to inspect
Returns
- bool
True if using application permissions, false otherwise
AccessTokenUsesApplicationPermissionsAsync()
Checks if the current access token uses application permissions
Task<bool> AccessTokenUsesApplicationPermissionsAsync()
Returns
CreateGroup(GraphGroupOptions, CreationOptions)
Create a Microsoft 365 Group
PnPContext CreateGroup(GraphGroupOptions graphGroupOptions, CreationOptions creationOptions = null)
Parameters
graphGroupOptionsGraphGroupOptionsOptions that define the Microsoft 365 Group to create
creationOptionsCreationOptionsOptions that control the group creation process
Returns
- PnPContext
PnPContext for the SharePoint site linked the new group
CreateGroupAsync(GraphGroupOptions, CreationOptions)
Create a Microsoft 365 Group
Task<PnPContext> CreateGroupAsync(GraphGroupOptions graphGroupOptions, CreationOptions creationOptions = null)
Parameters
graphGroupOptionsGraphGroupOptionsOptions that define the Microsoft 365 Group to create
creationOptionsCreationOptionsOptions that control the group creation process
Returns
- Task<PnPContext>
PnPContext for the SharePoint site linked the new group
GetMultiGeoLocations()
Returns a list of multi-geo locations for this tenant
List<IGeoLocationInformation> GetMultiGeoLocations()
Returns
- List<IGeoLocationInformation>
List of multi-geo locations if multi-geo, null otherwise
GetMultiGeoLocationsAsync()
Returns a list of multi-geo locations for this tenant
Task<List<IGeoLocationInformation>> GetMultiGeoLocationsAsync()
Returns
- Task<List<IGeoLocationInformation>>
List of multi-geo locations if multi-geo, null otherwise
GetSensitivityLabels()
Get the available sensitivity labels for the calling user or application
List<ISensitivityLabel> GetSensitivityLabels()
Returns
- List<ISensitivityLabel>
List of sensitivity labels
GetSensitivityLabelsAsync()
Get the available sensitivity labels for the calling user or application
Task<List<ISensitivityLabel>> GetSensitivityLabelsAsync()
Returns
- Task<List<ISensitivityLabel>>
List of sensitivity labels
GroupExists(string)
Check if a Microsoft 365 group exists
bool GroupExists(string mailNickName)
Parameters
mailNickNamestringMicrosoft 365 group alias to check for
Returns
- bool
True if the group exists, false otherwise
GroupExistsAsync(string)
Check if a Microsoft 365 group exists
Task<bool> GroupExistsAsync(string mailNickName)
Parameters
mailNickNamestringMicrosoft 365 group alias to check for
Returns
IsMultiGeoTenant()
Checks if this tenant is a multi-geo tenant
bool IsMultiGeoTenant()
Returns
- bool
True if multi-geo, false otherwise
IsMultiGeoTenantAsync()
Checks if this tenant is a multi-geo tenant
Task<bool> IsMultiGeoTenantAsync()