Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
179 views
in Technique[技术] by (71.8m points)

400 Bad request when creating app in Intune using microsoft graph api

Im trying to create an app in Intune using the MS Graph.

When post to the following endpoint and using the json body below I get a 400 bad request response

https://graph.microsoft.com/beta/deviceAppManagement/mobileApps

Is the json body wrong? The formatting is correct and all the fields seem to be there

{
"id":  "553834731",
"bundleId":  "com.midasplayer.apps.candycrushsaga",
"notes":  "We hope you’re having fun playing Candy Crush Saga! We update the game every week so donu0027t forget to download the latest version to get all the sweet new features and levels!

New to the game? Don’t be shy, join the fun! 

Coming back after a break? About time! 

Let’s play!",
"createdDateTime":  "/Date(1489497631738)/",
"owner":  "",
"largeIcon":  {
                  "@odata.type":  "microsoft.graph.mimeContent",
                  "type":  "image/jpeg",
                  "value":  "/9j/4AAQSkZJRgABAQEAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAA8ADwDAREAAhEBAxEB/8QAGQABAAMBAQAAAAAAAAAAAAAABQMEBgcC/8QANBAAAQMDAgUBBwIGAwAAAAAAAQIDBAAFERIhBhMxQVFhBxQiMnGBkRUjQlJigrHwcqGy/8QAHAEAAQQDAQAAAAAAAAAAAAAABwMEBQYAAQII/8QAMhEAAQIEAgcGBwEBAAAAAAAAAQIDAAQFESExBhJBUWFxgRMikaHB8AcUIzKx0fEV4f/aAAwDAQACEQMRAD8AHaRzFhPTNEKBdcDOL7cEtupDoyD3rB3hcQkt3UVYwn+jNRmVvzSUsHZsAZU4fCR5/wAVE1OsMU5ntXT02mJyjUOaqz/YsjDfsA3n3jFpvhueuCiY5HEOGr5FEDKvuev2GKGNT01qSvq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Os8oQRakSrc/IZmRFFkalMOK0OkeUg7K+xz6VgJEM3HwFhpxBsrba467R1FoX4UsV0dtT1uckLZtNz0rbhMspdkyuWsLy2FHShGpJy4r1CQd6k1VBqWlSqbNhsga1+ltrniqVIAH3k5C+XXh4xuDe5134gTNjWC2++hCGhz+Y6QlskgEako2JJ+WoyV0g/wAphTErghWdzcnZn+oRmNEaedV+cWVFORytyzgmffoDMki48Kwn5CviK2JrzKSD/TlW/wB6npbTKaUi5P4iOc+HdNdVrIJA98YJhPEKCCrSjuaK2WMAlaSrCNUJ0C8WtVpvEdMi351YVsUnGNSFDdKvWoueprcynvjExL0mtzFOdCmFWA8DHL+JOEZlnK5dqWu42oHZxKf3Wx4Wkf8AobfTpVHqFDeljcC44QbNHdOZWeASs6i9xyPI+mcAMz0qGyqgFMkQRWamlQzjScFxGLvfG2pefcmG1ypOk4PKbTqUPqcBP91baZBVdWQxMJ1KrFiXPZfeqyU8zgPDOOiWm2O3WULpKfYUtwcxUdhzStvGyGEjbTsNKe2B561moz5dWrWw3brfoRX3ZhuUaMshJvvIwN81E7ccTxh9yREg/tpQ0pYOXVp1J1HUScgZJ/49sqSTsKiTrLHd6f8AN3PkYjAl17Ek22Ddhb2eRjk/E05Mm7vKj55SfhTnwKskm0UNAKzizS7ZS2NbOLdego8lxIh5aElKVYBrI1bC0TomPtpTy3CnHTBrVgTjGrWFhFWZEhXFQM2DGdWermjSo/UpwTTB+mSr5utAv4fiJqTr9Rk0hLLxAGzMed4V4etMC2Wjil6DGS08LUoa9SlHBdbyNydqrdepsvKShUymxOGcXXRSvT1Uqbbc2vWSDe1gMekUGr7MZZPL5QynSQUZBB7EH/dqFKpNtSsYMTjCHPugydfJz6VNF3Q2eoQMZ+tOG5RpJ1rYws3LoTiBBNOocR//2Q=="
              },
"minimumSupportedOperatingSystem":  {
                                        "@odata.type":  "microsoft.graph.iosMinimumOperatingSystem",
                                        "v8_0":  "true",
                                        "v9_0":  "true",
                                        "v10_0":  "true"
                                    },
"description":  "Candy Crush Saga, from the makers of Candy Crush Soda Saga 
u0026 Farm Heroes Saga!

Join Tiffi and Mr. Toffee on their sweet adventure through the Candy Kingdom. Travel through magical lands, visiting wondrous places and meeting deliciously kooky characters! Switch and match your way through hundreds of fun levels in this delicious puzzle adventure. The sweetest game just keeps getting sweeter!

Take on this deliciously sweet Saga alone or play with friends to see who can get the top score!?

Candy Crush Saga is completely free to play but some optional 
in-game items will require payment.

You can turn off the payment feature by disabling in-app purchases in your device’s settings.

Candy Crush Saga features:
● Tasty ways to play: Target Score, Timed Levels, Drop Down Mode and Order Mode
● Collect sugar drops to progress along the Sugar Track for super sweet surprises!
● Spin the Daily Booster Wheel for a delicious prize
● Pass level 50 to unlock Dreamworld and escape reality with Odus the Owl
● Unwrap delicious environments and meet the sweetest characters
● Tasty Candies, wrapped and striped Special Candies, Color Bombs and various other magical boosters to help with challenging levels
● Hundreds of the best levels in the Candy Kingdom with more added every 2 weeks for your entertainment
● Leaderboards to watch your friends and competitors!
● Itu0027s easy to sync the game between devices and unlock full game features when connected to the Internet

Visit https://care.king.com/ if you need help!

Follow us to get news and updates;
facebook.com/CandyCrushSaga
Twitter @CandyCrushSaga
https://www.youtube.com/user/CandyCrushOfficial
http://candycrushsaga.com/

Have fun playing Candy Crush Saga!

Minimum iOS version recommended: 5.1.1",
"lastModifiedDateTime":  "/Date(1489497631738)/",
"privacyInformationUrl":  "",
"@odata.type":  "#microsoft.graph.iosStoreApp",
"applicableDeviceType":  {
                             "@odata.type":  "microsoft.graph.iosDeviceType",
                             "iPad":  "true",
                             "iPhoneAndIPod":  "true"
                         },
"informationUrl":  "",
"developer":  "King",
"displayName":  "Candy Crush Saga",
"uploadState":  1,
"appStoreUrl":  "https://itunes.apple.com/us/app/candy-crush-saga/id553834731?mt=8u0026uo=4",
"installSummary":  {
                       "@odata.type":  "microsoft.graph.mobileAppInstallSummary",
                       "installedDeviceCount":  0,
                       "failedDeviceCount":  0,
                       "notInstalledDeviceCount":  0,
                       "installedUserCount":  0,
                       "failedUserCount":  0,
                       "notInstalledUserCount":  0
                   },
"publisher":  "King.com Limited",
"isFeatured":  "false"

}

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I work on the Microsoft Intune Team.

There are a few fields in your request that are read-only and should not be included in the POST: id, createdDateTime, lastModifiedDateTime, uploadState, installSummary.

Also, minimumSupportedOperatingSystem can only have one of the values set to true and the others should be false.

We will update our documentation to reflect this.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...