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