SOLVED
Home

Update Intune Managed Device Category with Microsoft Graph were Failed

%3CLINGO-SUB%20id%3D%22lingo-sub-324334%22%20slang%3D%22en-US%22%3EUpdate%20Intune%20Managed%20Device%20Category%20with%20Microsoft%20Graph%20were%20Failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-324334%22%20slang%3D%22en-US%22%3E%3CP%3EI'd%20failed%20to%20update%20the%20managed%20device%20category%20in%20Intune%20with%20Microsoft%20Graph.%20With%20the%20same%20code%2C%20I'd%20succeeded%20to%20update%20device%20owner.%20Parameter%20below%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EURL%3A%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FmanagedDevices('XXXXXXXXXX%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FmanagedDevices('XXXXXXXXXX%3C%2FA%3E')%3CBR%20%2F%3EMethod%3A%20PUT%3C%2FP%3E%3CP%3EFailed%20request%20body%3A%3C%2FP%3E%3CPRE%3E%7B%20%22deviceCategoryDisplayName%22%3A%20%22General%20Purpose%22%20%7D%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESucceeded%20request%20body%3A%3C%2FP%3E%3CPRE%3E%7B%20%22Owner%22%3A%20%22Personal%22%20%7D%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22General%20Purpose%22%20is%20a%20custom%20value.%20When%20failed%2C%20the%20server%20returns%20an%20error%20code%20and%20activity%20id.%3C%2FP%3E%3CP%3EHow%20can%20I%20fix%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you.%3CBR%20%2F%3ERegards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-324334%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-375917%22%20slang%3D%22en-US%22%3ERe%3A%20Update%20Intune%20Managed%20Device%20Category%20with%20Microsoft%20Graph%20were%20Failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-375917%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F299788%22%20target%3D%22_blank%22%3E%40wazha%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'vd%20done%20it!%20Thank%20you%20so%20much!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Enayuta%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-375916%22%20slang%3D%22en-US%22%3ERe%3A%20Update%20Intune%20Managed%20Device%20Category%20with%20Microsoft%20Graph%20were%20Failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-375916%22%20slang%3D%22en-US%22%3EThank%20you.%20But%2C%20I%20want%20to%20update%20with%20Microsoft%20Graph%20API%20(%3A%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-366263%22%20slang%3D%22en-US%22%3ERe%3A%20Update%20Intune%20Managed%20Device%20Category%20with%20Microsoft%20Graph%20were%20Failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-366263%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20addition%20to%20what%20Oliver%20said%2C%20here's%20how%20if%20you%20want%20to%20do%20it%20through%20Graph%20API%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E1.%26nbsp%3B%20Create%20the%20category%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23222222%3B%20font-family%3A%20inherit%3B%20font-size%3A%209pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23146cac%3B%20text-decoration%3A%20underline%3B%22%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FdeviceCategories%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ERequest%20URL%20%3A%20https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FdeviceCategories%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20inherit%3B%20font-size%3A%209pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23545454%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-weight%3A%20bold%3B%22%3ERequest%20Method%3A%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23222222%3B%20font-family%3A%20%26amp%3Bquot%3B%22%3EPOST%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20font-family%3A%20%26amp%3Bquot%3B%22%3ERequest%20Payload%3A%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23212121%3B%20font-family%3A%20%26amp%3Bquot%3B%22%3E%7BdisplayName%3A%20%22testCategory(displayNameOfCategory)%22%7D%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23212121%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20lang%3D%22x-none%22%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23212121%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3ESample%20response%3A%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%7B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%22%40odata.context%22%3A%22%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2F%24metadata%23deviceManagement%2FdeviceCategories%2F%24entity%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2F%24metadata%23deviceManagement%2FdeviceCategories%2F%24entity%3C%2FA%3E%22%2C%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%22id%22%3A%2211111111-1111-1111-1111-111111111111(TakeThisIDItIsYourDeviceCategoryID)%22%2C%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%22displayName%22%3A%22testCategory%22%2C%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%22description%22%3Anull%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%7D%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20normal%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EOr%20Get%20categories%20if%20created%20already%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23222222%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%3B%20font-size%3A%209pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%3CA%20style%3D%22background-color%3A%20transparent%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23146cac%3B%20text-decoration%3A%20underline%3B%22%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FdeviceCategories%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ERequest%20URL%20%3A%20https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FdeviceCategories%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoe%20ui%26amp%3Bquot%3B%3B%20font-size%3A%209pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23545454%3B%20font-family%3A%20%26amp%3Bquot%3B%20segoeui%26amp%3Bquot%3B%2C%26amp%3Bquot%3Blato%26amp%3Bquot%3B%2C%26amp%3Bquot%3Bhelvetica%20neue%26amp%3Bquot%3B%2Chelvetica%2Carial%2Csans-serif%3B%20font-weight%3A%20bold%3B%22%3ERequest%20Method%3A%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23222222%3B%20font-family%3A%20%26amp%3Bquot%3B%22%3EGET%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23212121%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20lang%3D%22x-none%22%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23212121%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%20margin%3A%200in%200in%200in%200.375in%3B%22%3ESample%20response%3A%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%7B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%22%40odata.context%22%3A%22%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2F%24metadata%23deviceManagement%2FdeviceCategories%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2F%24metadata%23deviceManagement%2FdeviceCategories%3C%2FA%3E%22%2C%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%22value%22%3A%5B%7B%22id%22%3A%2211111111-1111-1111-1111-111111111111%22%2C%22displayName%22%3A%22testCategory%22%2C%22description%22%3Anull%7D%5D%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%7D%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E%3CSPAN%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011pt%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20normal%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E2.%20Set%20the%20category%20for%20device%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20color%3A%20%23545454%3B%22%3ERequest%20URL%3A%3C%2FSPAN%3E%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FmanagedDevices('07ffd540-3a01-4683-8ce9-1cb0008290f4')%2FdeviceCategory%2F%24ref%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20color%3A%20%23222222%3B%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FmanagedDevices('22222222-2222-2222-2222-222222222222(DeviceID)')%2FdeviceCategory%2F%24ref%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%209.0pt%3B%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20color%3A%20%23545454%3B%22%3ERequest%20Method%3A%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23222222%3B%22%3EPUT%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%22%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%209.0pt%3B%20color%3A%20%23222222%3B%22%3ERequest%20Payload%3A%20%7B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Consolas%3B%20font-size%3A%209.0pt%3B%20color%3A%20%23881391%3B%22%3E%40odata.id%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Consolas%3B%20font-size%3A%209.0pt%3B%20color%3A%20%23222222%3B%22%3E%22%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FdeviceCategories%2F91003329-de8b-41dc-a682-c1ef37bd7538%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-family%3A%20Consolas%3B%20font-size%3A%209.0pt%3B%20color%3A%20%23c41a16%3B%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FdeviceManagement%2FdeviceCategories%2F11111111-1111-1111-1111-111111111111(DeviceCategoryId)%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20style%3D%22font-family%3A%20Consolas%3B%20font-size%3A%209.0pt%3B%20color%3A%20%23222222%3B%22%3E%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Calibri%3B%20font-size%3A%209.0pt%3B%20color%3A%20%23222222%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3ESample%20response%3A%20204%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-332956%22%20slang%3D%22en-US%22%3ERe%3A%20Update%20Intune%20Managed%20Device%20Category%20with%20Microsoft%20Graph%20were%20Failed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-332956%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20have%20to%20create%20the%20category%20first%20in%20Intune%20before%20you%20can%20assign%20it%20to%20a%20device%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F72339i5504D32BDB77BE8F%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22SNAG-0047.png%22%20title%3D%22SNAG-0047.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eotherwise%20you%20are%20not%20seeing%20it%20and%20assignment%20is%20not%20allowed%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F72340i50A83FA820F9F10D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22SNAG-0048.png%22%20title%3D%22SNAG-0048.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EI%20think%20this%20constrained%20is%20the%20same%20when%20doing%20it%20via%20graph.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ebest%2C%3CBR%20%2F%3EOliver%3C%2FP%3E%3C%2FLINGO-BODY%3E
Nayuta
Occasional Contributor

I'd failed to update the managed device category in Intune with Microsoft Graph. With the same code, I'd succeeded to update device owner. Parameter below:

 

URL: https://graph.microsoft.com/beta/deviceManagement/managedDevices('XXXXXXXXXX')
Method: PUT

Failed request body:

{ "deviceCategoryDisplayName": "General Purpose" }

 

Succeeded request body:

{ "Owner": "Personal" }

 

"General Purpose" is a custom value. When failed, the server returns an error code and activity id.

How can I fix it?

 

Thank you.
Regards,

4 Replies

Hi,

 

you have to create the category first in Intune before you can assign it to a device:

SNAG-0047.png

 

otherwise you are not seeing it and assignment is not allowed:

SNAG-0048.png


I think this constrained is the same when doing it via graph.

 

best,
Oliver

Solution

In addition to what Oliver said, here's how if you want to do it through Graph API:

1.  Create the category

Request URL : https://graph.microsoft.com/beta/deviceManagement/deviceCategories

Request Method: POST

Request Payload: {displayName: "testCategory(displayNameOfCategory)"}

 

Sample response:

{

"@odata.context":"https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceCategories/$entity",

"id":"11111111-1111-1111-1111-111111111111(TakeThisIDItIsYourDeviceCategoryID)",

"displayName":"testCategory",

"description":null

}

Or Get categories if created already

Request URL : https://graph.microsoft.com/beta/deviceManagement/deviceCategories

Request Method: GET

 

Sample response:

{

"@odata.context":"https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceCategories",

"value":[{"id":"11111111-1111-1111-1111-111111111111","displayName":"testCategory","description":null}]

}

2. Set the category for device

Request URL: https://graph.microsoft.com/beta/deviceManagement/managedDevices('22222222-2222-2222-2222-2222222222...

Request Method: PUT

Request Payload: {@odata.id"https://graph.microsoft.com/beta/deviceManagement/deviceCategories/11111111-1111-1111-1111-111111111..."}

 

Sample response: 204

 

Thank you. But, I want to update with Microsoft Graph API (:

Hi @wazha,

 

I'vd done it! Thank you so much!

 

nayuta

Related Conversations
Extentions Synchronization
Deleted in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies