ThomasKur / IntuneDocumentation

Automatic Intune Documentation to simplify the life of admins and consultants.
GNU General Public License v3.0
339 stars 87 forks source link

Switched from 'AzureAD' to 'Az' Module #12

Closed RobinBeismann closed 5 years ago

RobinBeismann commented 5 years ago

Switched all requirements from AzureAD to Az module as this fixes #10 and makes the script work out of the box again.

ThomasKur commented 5 years ago

Has that really worked on your side? I tried it in a new PowerShell session, but still got errors?

RobinBeismann commented 5 years ago

It did last time, however I've just tried it on a fresh machine and it failed like yours. Looks like I had another module loaded when I created the commit. I'll fix it and push another commit - sorry.

RobinBeismann commented 5 years ago

I've fixed the issue, looks like the AzureRM Modules were merged into the Module Suite "Az", which also changes the Token Aquisition as the API doesn't return a refresh token anymore. My VSCode extensions autoformatted the code, sorry for that many changes.

Here's a post about the changes on the token aquisition workflow: https://github.com/Azure/azure-powershell/issues/7525

ThomasKur commented 5 years ago

Hi Robin, I have completely rewritten the script to use the new Intune PowerShell Module. So all the MFA Stuff is now working without a problem. I just did the changes in a new file. Please check it out. Also extended with some additional information.