0
虽然使用图形api从Intune获取托管应用程序并不成问题,但每次尝试从intune删除应用程序时,我都会禁止403。禁止使用MS Graph API从Intune删除托管应用程序
DELETE https://graph.microsoft.com/beta/deviceAppManagement/{appID} - returns 403
GET https://graph.microsoft.com/beta/deviceAppManagement/{appID} - returns 200
我试过在应用程序注册门户中添加应用程序并将其添加为Azure AD中的应用程序。 首先我从这里
https://login.microsoftonline.com/{TenantID}/oauth2/authorize?response_type=code
&redirect_uri=localhost
&client_id={MyAppID}
&resource={ "https://graph.microsoft.com"}
&prompt=admin_consent
&scope=DeviceManagementApps.ReadWrite.All
使用身份验证代码,然后从这里获得JWT令牌,使用代码
POST https://login.microsoftonline.com/{TenantID}/oauth2/token
-Body grant_type=authorization_code&redirect_uri={redirectURI}client_id={App/ClientID}&client_secret={App/ClientSecret}&code={MyAuthCode}&resource=https://graph.microsoft.com
然后我用返回的标记,使该图形API调用。 我也试过使用common
端点,但无济于事。 我是否缺少一些我需要设置的权限范围?我为应用程序设置了以下删除权限,并使用MS演示帐户上的管理员帐户进行身份验证。
Read and write Microsoft Intune apps (preview)
Sign in and read user profile
Read and write directory data
非常感谢你,我没有意识到只有类型为iosStoreApp或androidStoreApp的应用程序才能被删除。 – Moller