Skip to content

Commit

Permalink
Fixes ACS sample script null reference. Closes #5937
Browse files Browse the repository at this point in the history
  • Loading branch information
mathijs authored and milanholemans committed Mar 29, 2024
1 parent fc0eacc commit 54c55e1
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ For this method, you need to create a certificate and a new Entra App.

To create a new app with the required permissions, use the following command:

m365 entra app add --name 'RetirementReportApp' --apisApplication 'https://graph.microsoft.com/Application.Read.All,https://graph.microsoft.com/Sites.Read.All,https://microsoft.sharepoint-df.com/Sites.Manage.All' --certificateFile "C:\Path\To\Certificate.cer" --certificateDisplayName 'Certificate' --grantAdminConsent
```sh
m365 entra app add --name 'RetirementReportApp' --apisApplication 'https://graph.microsoft.com/Application.Read.All,https://graph.microsoft.com/Sites.Read.All,https://microsoft.sharepoint-df.com/Sites.Manage.All' --certificateFile "C:\Path\To\Certificate.cer" --certificateDisplayName 'Certificate' --grantAdminConsent
```

<Tabs>
<TabItem value="PowerShell">
Expand Down Expand Up @@ -92,7 +94,7 @@ function GetRetirementStatus {
$m365Status = m365 status --output text
if ($m365Status -eq "Logged Out") {
if ($m365Status -eq "Logged out") {
# Connection to Microsoft 365
if ($AuthenticationMethod -eq "DeviceCode") {
Write-Host "Logging in using DeviceCode authentication"
Expand Down Expand Up @@ -129,7 +131,7 @@ function GetRetirementStatus {
AppName = $EntraApp.displayName
AppId = $EntraApp.appId
ServicePrincipalType = $EntraApp.servicePrincipalType
Created = $EntraApp.createdDateTime.ToLongDateString()
Created = $EntraApp.createdDateTime?.ToLongDateString()
}
}
return $ResultList
Expand Down

0 comments on commit 54c55e1

Please sign in to comment.