LearningAssignedCourse.ReadWrite.All
Allows the app to create, update, read and delete all assignments in the organization's directory, without a signed-in user.
Permission Details
Read and write all assignments
Allows the app to create, update, read and delete all assignments in the organization's directory, without a signed-in user.
236c1cbd-1187-427f-b0f5-b1852454973b
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
communities |
community collection |
A collection of communities in Viva Engage. |
engagementAsyncOperations |
engagementAsyncOperation collection |
A collection of long-running, asynchronous operations related to Viva Engage. |
learningCourseActivities |
learningCourseActivity collection |
|
learningProviders |
learningProvider collection |
A collection of learning providers. |
roles |
engagementRole collection |
A collection of roles in Viva Engage. |
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"@odata.type": "#microsoft.graph.employeeExperience"
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
communities |
community collection |
A collection of communities in Viva Engage. |
engagementAsyncOperations |
engagementAsyncOperation collection |
A collection of long-running, asynchronous operations related to Viva Engage. |
learningProviders |
learningProvider collection |
A collection of learning providers. |
roles |
engagementRole collection |
A collection of roles in Viva Engage. |
learningCourseActivities |
learningCourseActivity collection |
Related learningCourseActivities data exposed by this resource. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are not available from refreshed Microsoft Learn PowerShell snippets for this permission.
No deterministic PowerShell command map is available for this permission.
Browse PowerShell docsMicrosoft Graph PowerShell beta commands are not available from refreshed Microsoft Learn PowerShell snippets for this permission.
No deterministic PowerShell command map is available for this permission.
Browse PowerShell docsCode Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new LearningAssignment
{
OdataType = "#microsoft.graph.learningAssignment",
AssignedDateTime = DateTimeOffset.Parse("2021-05-11T22:57:17+00:00"),
AssignmentType = AssignmentType.Required,
AssignerUserId = "cea1684d-57dc-438d-a9d1-e666ec1a7f3d",
CompletedDateTime = null,
CompletionPercentage = 20,
DueDateTime = new DateTimeTimeZone
{
DateTime = "2022-09-22T16:05:00.0000000",
TimeZone = "UTC",
},
ExternalCourseActivityId = "12a2228a-e020-11ec-9d64-0242ac120002",
LearningContentId = "57baf9dc-e020-11ec-9d64-0242ac120002",
LearningProviderId = "01e8f81b-3060-4dec-acf0-0389665a0a38",
LearnerUserId = "7ba2228a-e020-11ec-9d64-0242ac120002",
Notes = new ItemBody
{
ContentType = BodyType.Text,
Content = "required assignment added for user",
},
Status = CourseStatus.NotStarted,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.EmployeeExperience.LearningProviders["{learningProvider-id}"].LearningCourseActivities.PostAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const learningCourseActivity = {
'@odata.type': '#microsoft.graph.learningAssignment',
assignedDateTime: '2021-05-11T22:57:17+00:00',
assignmentType: 'required',
assignerUserId: 'cea1684d-57dc-438d-a9d1-e666ec1a7f3d',
completedDateTime: null,
completionPercentage: 20,
dueDateTime: {
dateTime: '2022-09-22T16:05:00.0000000',
timeZone: 'UTC'
},
externalCourseActivityId: '12a2228a-e020-11ec-9d64-0242ac120002',
learningContentId: '57baf9dc-e020-11ec-9d64-0242ac120002',
learningProviderId: '01e8f81b-3060-4dec-acf0-0389665a0a38',
learnerUserId: '7ba2228a-e020-11ec-9d64-0242ac120002',
notes: {
contentType: 'text',
content: 'required assignment added for user'
},
status: 'notStarted'
};
await client.api('/employeeExperience/learningProviders/01e8f81b-3060-4dec-acf0-0389665a0a38/learningCourseActivities')
.post(learningCourseActivity);
Connect-MgGraph -Scopes "LearningAssignedCourse.ReadWrite.All"
Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/employeeExperience/learningCourseActivities/{id}"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.learning_assignment import LearningAssignment
from msgraph.generated.models.assignment_type import AssignmentType
from msgraph.generated.models.date_time_time_zone import DateTimeTimeZone
from msgraph.generated.models.item_body import ItemBody
from msgraph.generated.models.body_type import BodyType
from msgraph.generated.models.course_status import CourseStatus
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = LearningAssignment(
odata_type = "#microsoft.graph.learningAssignment",
assigned_date_time = "2021-05-11T22:57:17+00:00",
assignment_type = AssignmentType.Required,
assigner_user_id = "cea1684d-57dc-438d-a9d1-e666ec1a7f3d",
completed_date_time = None,
completion_percentage = 20,
due_date_time = DateTimeTimeZone(
date_time = "2022-09-22T16:05:00.0000000",
time_zone = "UTC",
),
external_course_activity_id = "12a2228a-e020-11ec-9d64-0242ac120002",
learning_content_id = "57baf9dc-e020-11ec-9d64-0242ac120002",
learning_provider_id = "01e8f81b-3060-4dec-acf0-0389665a0a38",
learner_user_id = "7ba2228a-e020-11ec-9d64-0242ac120002",
notes = ItemBody(
content_type = BodyType.Text,
content = "required assignment added for user",
),
status = CourseStatus.NotStarted,
)
result = await graph_client.employee_experience.learning_providers.by_learning_provider_id('learningProvider-id').learning_course_activities.post(request_body)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Application permissions and search for LearningAssignedCourse.ReadWrite.All
Grant Admin Consent
Application permissions always require admin consent.