Giter VIP home page Giter VIP logo

Comments (2)

powershellking avatar powershellking commented on August 20, 2024

This issue has something to do with the way Intune-AppDeploy authenticates against Microsoft Graph. The client ID that is provided as default in Intune-AppDeploy is from the old Intune-PowerShell enterprise application that uses the old ADAL standard to authenticate against Microsoft Graph. Itnune AppDeploy instead uses the more modern MSAL standard which requires other redirect URIs to be configured. In order to solve this, I suggest that you create your own app registration in Azure for that purpose. Therefore follow these steps:

  1. Go to https://portal.azure.com and sign in with a user that has at least application administrator privileges.
  2. Go to Azure Active Directory
  3. Click on App registrations.
  4. Select New registration.
  5. Give your application a meaningful name.
  6. Depending on your use case select single or multi-tenant app. (Allowing personal accounts in my opinion doesn't make sense because personal accounts can't use Intune afaik.
  7. At this point leave the redirect URI blank and click Register. The redirect URI will be added later on.
  8. Now go to authentication and click Add a platform.
  9. Select mobile and desktop applications and tick the redirect URL https://login.microsoftonline.com/common/oauth2/nativeclient and click configure.
  10. Next go to API permissions and click Add a permission.
  11. Navigate to Microsoft Graph --> Delegated permissions.
  12. Expand DeviceManagementApps and tick DeviceManagementApps.ReadWriteAll and click Add permission. This is the minimum required permission to create apps. If you're planning to use more of @tabs-not-spaces 's great tools you might want to visit his website here for additional required permissions: https://powers-hell.com/2020/06/28/managing-intune-with-graph-powershell-7-msal/. When you're finished click on configure.
  13. Next important thing is to grant the admin consent. Therefore click on Grant admin consent for and confirm by clicking on yes.
  14. Now go back to the overview page of the app registration you just created. There you'll find the client ID which is required for authentication. Copy it and replace the old client ID in the function Get-AuthToken (file tasks/Deploy.functions.ps1) with your new one.

Now the authentication should work as expected.

from intune-app-deploy.

awlnx avatar awlnx commented on August 20, 2024

That did work.
Thanks.

from intune-app-deploy.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.