-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graph API permission #21
Comments
Microsoft has complicated this early this year by terminating Microsoft intune Powershell enterprise application. instead you need to create an app registration yourself. |
So the app is not working at the moment... Correct? |
Correct. I found https://github.com/Romanitho/WingetIntunePackager , the last PR includes App registration Id field. (more info at pull request Romanitho/WingetIntunePackager#30 Not tried yet, let me know if this works |
Well... I tried that one before yours. With that one I cannot even connect. Even after creating an app in entra and giving the right permissions and the uri. So that's why I gave this one a try. I guess I am out of options. |
Well, i'm gonna create it on my own :). |
I fixed the issues which occured after the MS App Registration change within the script and added as well to the GUI to set your own non default Client ID and Redirect URI. If the app registration doesn't have the permission, you will be asked with Connect-MgGraph to give the permission. You can get my version in my fork: https://github.com/InnovationForge-com/WinGet-Wrapper If you want the GUI options then you need to start WinGet-WrapperImportGUI.ps1 and not WinGet-WrapperImportGUI.exe. |
Great work! |
@huuub @Ivanodib @SorenLundt I just checked the Release again and the PR i posted. For me it works fine, im not sure what issues you are facing? You can just create your own Application, give Group Read All, Apps ReadWrite All and ManagedDevices ReadWrite All. Then you can connect to the App with the Application (client) ID and the default Redirect URI https://login.microsoftonline.com/common/oauth2/nativeclient which you ofcourse have to add in your App aswell as an Redirect Mobile and Desktop App URI. |
created PR #23 Azure AD Application Configuration for WinGet-WrapperBackgroundThe WinGet-Wrapper tool uses Microsoft Graph API to interact with Intune. By default, it uses a built-in application ID, but due to recent Microsoft infrastructure changes and security policies, it's recommended to create your own Azure AD application registration. This ensures:
Creating Your Azure AD ApplicationStep 1: Create the Application Registration
Step 2: Configure Authentication
This configuration is crucial because the PowerShell scripts use interactive authentication, which requires a proper redirect URI. Step 3: Configure API Permissions
Updating the ScriptsYou need to update the ClientID in the following files: Option 1: Modify the Script DirectlyUpdate #ClientID to connect to MSGraph/InTune with Connect-MSIntuneGraph
[Parameter(Mandatory = $False)]
[string]$ClientID = "your-application-id-here" Option 2: Pass ClientID as ParameterRun the script with your ClientID: .\WinGet-WrapperImportFromCSV.ps1 -TenantID "yourtenant.onmicrosoft.com" -ClientID "your-application-id" -csvFile "your-csv-file.csv" TroubleshootingCommon Issues
Best Practices
Required Azure AD RolesThe user account running the scripts needs one of these roles:
Additional Resources |
Upload doesn't work. Is App registration required? which permissions are needed? delegated or application? If needed, how can i import ClientID and ClientSecret ?
The text was updated successfully, but these errors were encountered: