Mar 24 2023 08:30 AM - edited Mar 28 2023 09:42 PM
Using the Microsoft graph API, we can access any users assignedPlans.
Based on the assignedPlans value. I want to check weather the users has OneDriver access or not, which of the assignedPlan value presence confirms that the user has OneDrive access.
https://graph.microsoft.com/v1.0/users?$select=id,userPrincipalName,mail,displayName,assignedPlans
Example service list is
"assignedPlans": [
{
"assignedDateTime": "2023-03-02T17:07:46Z",
"capabilityStatus": "Enabled",
"service": "YammerEnterprise",
"servicePlanId": "a82fbf69-b4d7-49f4-83a6-915b2cf354f4"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "MicrosoftKaizala",
"servicePlanId": "54fc630f-5a40-48ee-8965-af0503c1386e"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "DynamicsNAV",
"servicePlanId": "39b5c996-467e-4e60-bd62-46066f572726"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "ccibotsprod",
"servicePlanId": "041fe683-03e4-45b6-b1af-c0cdc516daee"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "To-Do",
"servicePlanId": "5e62787c-c316-451f-b873-1d05acd4d12c"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "exchange",
"servicePlanId": "9aaf7827-d63c-4b61-89c3-182f06f82e5c"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "WhiteboardServices",
"servicePlanId": "b8afc642-032e-4de5-8c0a-507a7bba7e5d"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "MicrosoftCommunicationsOnline",
"servicePlanId": "0feaeb32-d00e-4d66-bd5a-43b5b83db82c"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "MicrosoftStream",
"servicePlanId": "3c53ea51-d578-46fa-a4c0-fd0a92809a60"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "TeamspaceAPI",
"servicePlanId": "57ff2da0-773e-42df-b2af-ffb7a2317929"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "ProcessSimple",
"servicePlanId": "50e68c76-46c6-4674-81f9-75456511b170"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "ProcessSimple",
"servicePlanId": "0f9b09cb-62d1-4ff4-9129-43f4996f83f4"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "OfficeForms",
"servicePlanId": "159f4cd6-e380-449f-a816-af1a9ef76344"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "exchange",
"servicePlanId": "5bfe124c-bbdc-4494-8835-f1297d457d79"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "Sway",
"servicePlanId": "a23b959c-7ce8-4e57-9140-b90eb88a9e97"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "MicrosoftOffice",
"servicePlanId": "094e7854-93fc-4d55-b2c0-3ab5369ebdc1"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "ProjectWorkManagement",
"servicePlanId": "b737dad2-2f6c-4c65-90e3-ca563267e8b9"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "LearningAppServiceInTeams",
"servicePlanId": "b76fb638-6ba6-402a-b9f9-83d28acb3d86"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "Deskless",
"servicePlanId": "8c7d2df8-86f0-4902-b2ed-a0458298f3b3"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "CRM",
"servicePlanId": "17ab22cd-a0b3-4536-910a-cb6eb12696c0"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "exchange",
"servicePlanId": "33c4f319-9bdd-48d6-9c4d-410b750a4a5a"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "exchange",
"servicePlanId": "199a5c09-e0ca-4e37-8f7c-b05d533e1ea2"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "CRM",
"servicePlanId": "95b76021-6a53-4741-ab8b-1d1f3d66a95a"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "SharePoint",
"servicePlanId": "e95bec33-7c88-4a70-8e19-b10bd9d0c014"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "ProjectProgramsAndPortfolios",
"servicePlanId": "31b4e2fc-4cd6-4e7d-9c1b-41407303bd66"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "CRM",
"servicePlanId": "4ff01e01-1ba7-4d71-8cf8-ce96c3bbcf14"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "SharePoint",
"servicePlanId": "c7699d2e-19aa-44de-8edf-1736da088ca1"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "YammerEnterprise",
"servicePlanId": "7547a3fe-08ee-4ccb-b430-5077c5041653"
},
{
"assignedDateTime": "2022-09-05T12:56:42Z",
"capabilityStatus": "Enabled",
"service": "PowerAppsService",
"servicePlanId": "92f7a6f3-b89b-4bbd-8c30-809e6da5ad1c"
}
]