WorkforceIntegration.ReadWrite.All
Allows the app to manage workforce integrations to synchronize data from Microsoft Teams Shifts, without a signed-in user.
Permission Details
Read and write workforce integrations
Allows the app to manage workforce integrations to synchronize data from Microsoft Teams Shifts, without a signed-in user.
202bf709-e8e6-478e-bcfd-5d63c50b68e3
Read and write workforce integrations
Allows the app to manage workforce integrations, to synchronize data from Microsoft Teams Shifts, on behalf of the signed-in user.
08c4b377-0d23-4a8b-be2a-23c1c1d88545
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
apiVersion |
Int32Nullable |
API version for the callback URL. Start with 1. |
createdDateTime |
DateTimeOffsetRead-onlyNullable |
The date and time at which this workforceIntegration was first created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Inherited from changeTrackedEntity. |
displayName |
StringNullable |
Name of the workforce integration. |
eligibilityFilteringEnabledEntities |
eligibilityFilteringEnabledEntities |
Support to view eligibility-filtered results. The possible values are: none, swapRequest, offerShiftRequest, unknownFutureValue, timeOffReason. Use the Prefer: include-unknown-enum-members request header to get the following members in this evolvable enum: timeOffReason. |
encryption |
workforceIntegrationEncryption |
The workforce integration encryption resource. |
isActive |
BooleanNullable |
Indicates whether this workforce integration is currently active and available. |
supportedEntities |
workforceIntegrationSupportedEntities |
The Shifts entities supported for synchronous change notifications. Shifts call back to the provided URL when client changes occur to the entities specified in this property. By default, no entities are supported for change notifications. The possible values are: none, shift, swapRequest, userShiftPreferences, openShift, openShiftRequest, offerShiftRequest, unknownFutureValue, timeCard, timeOffReason, timeOff, timeOffRequest. Use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: timeCard , timeOffReason , timeOff , timeOffRequest. |
url |
StringNullable |
Workforce Integration URL for callbacks from the Shifts service. |
createdBy |
object |
Identity of the creator of the entity. |
id |
string |
The unique identifier for an entity. Read-only. |
lastModifiedBy |
objectRead-only |
Identity of the person who last modified the entity. |
lastModifiedDateTime |
date-timeRead-onlyNullable |
The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z |
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"@odata.type": "#microsoft.graph.workforceIntegration",
"apiVersion": "Int32",
"createdDateTime": "String (timestamp)",
"displayName": "String",
"eligibilityFilteringEnabledEntities": "String",
"encryption": {
"@odata.type": "microsoft.graph.workforceIntegrationEncryption"
},
"id": "String (identifier)",
"isActive": "Boolean",
"lastModifiedBy": {
"@odata.type": "microsoft.graph.identitySet"
},
"lastModifiedDateTime": "String (timestamp)",
"supportedEntities": "String",
"url": "String"
}
Relationships
Relationships metadata is not available for this permission mapping.
View resource documentationGraph 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 mapped directly from refreshed Microsoft Learn PowerShell snippets.
Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new WorkforceIntegration
{
DisplayName = "ABCWorkforceIntegration",
ApiVersion = 1,
IsActive = true,
Encryption = new WorkforceIntegrationEncryption
{
Protocol = WorkforceIntegrationEncryptionProtocol.SharedSecret,
Secret = "My Secret",
},
Url = "https://ABCWorkforceIntegration.com/Contoso/",
SupportedEntities = WorkforceIntegrationSupportedEntities.Shift | WorkforceIntegrationSupportedEntities.SwapRequest,
EligibilityFilteringEnabledEntities = EligibilityFilteringEnabledEntities.SwapRequest,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teamwork.WorkforceIntegrations.PostAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const workforceIntegration = {
displayName: 'ABCWorkforceIntegration',
apiVersion: 1,
isActive: true,
encryption: {
protocol: 'sharedSecret',
secret: 'My Secret'
},
url: 'https://ABCWorkforceIntegration.com/Contoso/',
supportedEntities: 'Shift,SwapRequest',
eligibilityFilteringEnabledEntities: 'SwapRequest'
};
await client.api('/teamwork/workforceIntegrations')
.post(workforceIntegration);
Import-Module Microsoft.Graph.Teams
$params = @{
displayName = "ABCWorkforceIntegration"
apiVersion = 1
isActive = $true
encryption = @{
protocol = "sharedSecret"
secret = "My Secret"
}
url = "https://ABCWorkforceIntegration.com/Contoso/"
supportedEntities = "Shift,SwapRequest"
eligibilityFilteringEnabledEntities = "SwapRequest"
}
New-MgTeamworkWorkforceIntegration -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.workforce_integration import WorkforceIntegration
from msgraph.generated.models.workforce_integration_encryption import WorkforceIntegrationEncryption
from msgraph.generated.models.workforce_integration_encryption_protocol import WorkforceIntegrationEncryptionProtocol
from msgraph.generated.models.workforce_integration_supported_entities import WorkforceIntegrationSupportedEntities
from msgraph.generated.models.eligibility_filtering_enabled_entities import EligibilityFilteringEnabledEntities
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = WorkforceIntegration(
display_name = "ABCWorkforceIntegration",
api_version = 1,
is_active = True,
encryption = WorkforceIntegrationEncryption(
protocol = WorkforceIntegrationEncryptionProtocol.SharedSecret,
secret = "My Secret",
),
url = "https://ABCWorkforceIntegration.com/Contoso/",
supported_entities = WorkforceIntegrationSupportedEntities.Shift | WorkforceIntegrationSupportedEntities.SwapRequest,
eligibility_filtering_enabled_entities = EligibilityFilteringEnabledEntities.SwapRequest,
)
result = await graph_client.teamwork.workforce_integrations.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 or delegated permissions and search for WorkforceIntegration.ReadWrite.All
Grant Admin Consent
Application permissions always require admin consent.