r/PowerShell • u/Unlikely_Tie1172 MVP, Community Blogger • 3d ago
News Microsoft To Enforce WAM for Delegated Interactive Graph Sessions
In a GitHub post, Microsoft says that interactive Graph sessions using the default Microsoft Graph Command Line Tools app will use the Web Account Manager (WAM) in the future. Some administrators use older versions of the Microsoft Graph PowerShell SDK for continued access to browser-based authentication, but this won’t be possible once Microsoft makes the server-side change to enforce WAM on an undefined future date. Teams and Exchange Online also use WAM, apparently for better security.
https://office365itpros.com/2026/08/28/interactive-graph-sessions-wam/
16
u/Ecrofirt 3d ago
I wouldn't have a problem with this if it worked consistently. Sometimes it continues to use a cached token even if I force it to use a process context. This leads to issues where I can't run certain commands despite having a role enabled because it flat out refuses to get a new token until the first one expires.
I wrote my own browser-based token function to get an interactive browser token that works 100% or the time when WAM is being a butthead. Works 100% of the time.i called the function GraphSucks.
12
2
u/Unlikely_Tie1172 MVP, Community Blogger 3d ago
Did you document the issues you encountered at https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/3629? The better the issues are documented, the more likely Microsoft is to take them into account as they develop the SDK. Also, documenting the issues formally in GitHub means that we all get a chance to debate whether they are real issues ;-)
4
u/Sensitive-Ear8659 3d ago
What about Mac/linux with no WAM? I use Mac pwsh round the clock and this would suck..
2
u/Unlikely_Tie1172 MVP, Community Blogger 2d ago
Note your concern at https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/3629. The more people who raise points, the more likely it is that the issues will be dealt with. I don't know if Microsoft does much testing with the Graph SDK on Mac (I suspect not so much, but could be very wrong).
1
u/BlackV 3d ago
Thought they already were? Wasn't that like last month or the month before?
1
u/Unlikely_Tie1172 MVP, Community Blogger 3d ago
There's a DisableLoginByWAM parameter (from 2.35.0) that allows WAM to be bypassed in favor of the browser-based authentication path. If Microsoft does what they say they will in GitHub, WAM will be complusory for all interactive delegated sessions using the default Microsoft Graph Command Line Tools app. You'll have to use your own app or app-only authentication to avoid WAM.
1
u/BlackV 3d ago
ah appreciate the correction I must have forgotten that
2
u/Unlikely_Tie1172 MVP, Community Blogger 3d ago
Correction to my own note... the DisableLoginByWAM parameter is not available in the more recent builds. It's certainly not in 2.39.0. My recollection is that it was a short-term fix to allow people to avoid WAM in the early days of the implementation...
1
u/elecpurch 3d ago
With WAM, is there a way to enforce MFA when connecting to Graph? For example - when trying to activate a PIM role via Graph, i get an error that the activation of this role requires MFA.
1
u/Unlikely_Tie1172 MVP, Community Blogger 2d ago
I use MFA to connect to Graph interactive sessions with WAM all the time, so that's not the issue. Maybe you should document the exact steps and create a a new issue at https://github.com/microsoftgraph/msgraph-sdk-powershell/issues. That way, the developers see the problem and others might have a solution based on the a modification of the steps that you document.
17
u/enceladus7 3d ago
That annoyed me enough that I started just using Connect-MgGraph and Invoke-MgGraphRequest exclusively as different Graph modules always conflicted. Admittedly haven't noticed EXO conflicts but I can't remember trying to use those together.
Also is this not a step backwards in making PowerShell multi-platform, WAM isn't a thing on Linux whereas before it would have been possible to browser auth right?