Replies: 2 comments 1 reply
-
|
Did you know that you can use |
Beta Was this translation helpful? Give feedback.
-
|
question for the group, what would be the best way to automate full tasks using less powershell modules when it comes to connect-msgraph and connect-mggraph for automated tasks? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Function Start-GraphAuth(){
$scope = @(
"openid"
"offline_access"
"DeviceManagementManagedDevices.PrivilegedOperations.All"
"DeviceManagementManagedDevices.ReadWrite.All"
"DeviceManagementRBAC.ReadWrite.All"
"DeviceManagementApps.ReadWrite.All"
"DeviceManagementConfiguration.ReadWrite.All"
"DeviceManagementServiceConfig.ReadWrite.All"
"Group.ReadWrite.All"
"Directory.Read.All"
"User.Read"
"Group.Read.All"
"AuditLog.Read.All"
"UserAuthenticationMethod.Read.All"
"AuthenticationContext.Read.All"
"Policy.Read.All"
)
#Client Id for Microsoft Graph Powershell Application
$clientid = "14d82eec-204b-4c2f-b7e8-296a70dab67e"
$token = Get-MsalToken -ClientId $clientid -Scopes $scope
}
Remember to only use permission scopes for what you need.
Beta Was this translation helpful? Give feedback.
All reactions