Gerenios / AADInternals

AADInternals PowerShell module for administering Azure AD and Office 365
http://aadinternals.com/aadinternals
MIT License
1.27k stars 216 forks source link

requesting user certificates error need decrypt #36

Closed FlangvikAD closed 2 years ago

FlangvikAD commented 2 years ago

Hi, I am having some issues requesting user certificates using AADInternals, the issue code is https://github.com/Gerenios/AADInternals/blob/b4f082cca33452ae372f1ef0c780d425782c1156/PRT.ps1#L784 Microsoft currently encrypts the response body and cannot directly obtain the content of the x5c parameters. The original text is as follows: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oapxbc/eaf102b1-17d0-4988-b66b- 0f3c16193e9f

NestoriSyynimaa commented 2 years ago

I tried this and had no issues. Could you provide details how to reproduce?

FlangvikAD commented 2 years ago

Sorry, I wrongly located the code location, it is the user certificate instead of the device certificate, which is the Exchange Primary Refresh Token for User Authentication Certificate, The original project is https://github.com/morRubin/PrtToCert

NestoriSyynimaa commented 2 years ago

So this was not AADInternals issue at all?

FlangvikAD commented 2 years ago

Thanks for your reply, it's not AADInternals' problem, sorry about that

FlangvikAD commented 2 years ago

I don't know if you have any idea of ​​adding the function of requesting user certificate in AADInternals

NestoriSyynimaa commented 2 years ago

Sure, I'll have a look at that. Shouldn't be that difficult.