ThomasKur / M365Documentation

Automatic Microsoft 365 Documentation to simplify the life of admins and consultants.
Other
300 stars 45 forks source link

AzureAD Component Errors #40

Open NorthantsAndy opened 9 months ago

NorthantsAndy commented 9 months ago

Only when using against AzureAD, I get the following errors, no idea if they're known or something to do with my system, but here they are:

Copy-Item : Could not find a part of the path 'C:\FILENAME.docx'.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Functions\Write-M365DocWord.ps1:45 char:13
+             Copy-Item "$PSScriptRoot\..\Data\Template.docx" -Destinat ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Copy-Item], DirectoryNotFoundException
    + FullyQualifiedErrorId : System.IO.DirectoryNotFoundException,Microsoft.PowerShell.Commands.CopyItemCommand

Convert-Path : Cannot find path 'c:\FILENAME.docx' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\PSWriteWord\1.1.14\PSWriteWord.psm1:966 char:21
+         $FilePath = Convert-Path -LiteralPath $FilePath
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (c:\FILENAME.docx:String) [Convert-Path], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ConvertPathCommand

Test-Path : Cannot bind argument to parameter 'LiteralPath' because it is null.
At C:\Program Files\WindowsPowerShell\Modules\PSWriteWord\1.1.14\PSWriteWord.psm1:967 char:36
+         if (Test-Path -LiteralPath $FilePath) {
+                                    ~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.TestPathCommand

Both Paragraph and WordDocument are null
At C:\Program Files\WindowsPowerShell\Modules\PSWriteWord\1.1.14\PSWriteWord.psm1:1326 char:103
+ ... graph() } else { throw 'Both Paragraph and WordDocument are null' } }
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Both Paragraph and WordDocument are null:String) [], RuntimeException
    + FullyQualifiedErrorId : Both Paragraph and WordDocument are null

PS C:\WINDOWS\system32> C:\Data\Blackstar\ALL,ps1.ps1
Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Get-AADBranding.ps1:23 char:27
+ ... c.Objects = Invoke-DocGraph -Path "/organization/$($org.value.id)/bra ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph

Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Helper\Get-AzureADUser.ps1:19 char:18
+         $user = (Invoke-DocGraph -Path "/users/$UserId" -Beta)
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph

Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Helper\Get-AzureADUser.ps1:19 char:18
+         $user = (Invoke-DocGraph -Path "/users/$UserId" -Beta)
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph

Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Helper\Get-AzureADUser.ps1:19 char:18
+         $user = (Invoke-DocGraph -Path "/users/$UserId" -Beta)
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph

Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Helper\Get-AzureADUser.ps1:19 char:18
+         $user = (Invoke-DocGraph -Path "/users/$UserId" -Beta)
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph

Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Helper\Get-AzureADUser.ps1:19 char:18
+         $user = (Invoke-DocGraph -Path "/users/$UserId" -Beta)
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph

Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Helper\Get-AzureADUser.ps1:19 char:18
+         $user = (Invoke-DocGraph -Path "/users/$UserId" -Beta)
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph

Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Helper\Get-AzureADUser.ps1:19 char:18
+         $user = (Invoke-DocGraph -Path "/users/$UserId" -Beta)
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph

Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Helper\Get-AzureADUser.ps1:19 char:18
+         $user = (Invoke-DocGraph -Path "/users/$UserId" -Beta)
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph

Invoke-DocGraph : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.1\Internal\Collector\AzureAD\Get-AADPolicy.ps1:140 char:34
+ ... .Objects = (Invoke-DocGraph -Path "/identity/continuousAccessEvaluati ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DocGraph
ThomasKur commented 6 months ago

Can you please try again with the new released version? I can't reproduce your errors but have now also changed some parts which could have an impact on your issue.

dcox79 commented 5 months ago

I tried with the current version in PSGallery and am getting the same error. $doc = Get-M365Doc -Components "AzureAD" Invoke-DocGraph : The remote server returned an error: (404) Not Found. At C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.2.2\Internal\Collector\AzureAD\Get-AADPolicy.ps1:140 char:34

DaStivi commented 4 months ago

hey there, i've the same issue. Invoke-DocGraph : Der Remoteserver hat einen Fehler zurückgegeben: (404) Nicht gefunden. In C:\Program Files\WindowsPowerShell\Modules\M365Documentation\3.3.0\Internal\Collector\AzureAD\Get-AADPolicy.ps1:140 Zeichen:34

i checked the graphAPI, at least the /identity/continuousAccessEvaluation is available there... i tried to change the get-aadpolicy.ps1 on line 140 to use ah different path but strangly the error kept saying the /indentity... (i tried to append /beta/ before as this would be the url for the beta