pnp / graph-connectors-samples

Microsoft Graph Connector samples
https://aka.ms/gc/samples
MIT License
48 stars 35 forks source link

dotnet-csharp-m365-roadmap: config instructions incorrect #54

Closed jthake closed 5 months ago

jthake commented 5 months ago

First off thank you for this sample! Its a great idea!

The readme file states setting user settings with "AzureAd:" but in the GraphService.cs its looking for "EntraId:".

Rather than change my self wanted @mohammadamer to confirm this is correct to adjust.

On changing, it did not throw an error about not finding ClientId. But after waiting 5 mins it did not show up in Search And Intelligence center.

The readme also had the wrong command arguments: they should be provision-connection not create-content.

The readme for this sample would be useful to explain what permissions scopes are required for the Azure AD / Entra Id app.

It would be useful if it outputted more verbose messages in the command line to explain what it actually did rather than closing silently.

As an example, when i ran load-content after doing provision-connector I just got "ERROR" on every single time it tried to index item without any detailed error messages.

mohammadamer commented 5 months ago

Hi @jthake Thanks for submitting the issue. You are right about settings, it should be this way. I'll update the readme file soon.

dotnet user-secrets set "EntraId:ClientId" "[application id]"
dotnet user-secrets set "EntraId:ClientSecret" "[secret value]"
dotnet user-secrets set "EntraId:TenantId" "[directory (tenant) id]"

The command arguments should be

dotnet run -- provision-connection
dotnet run -- load-content

Regarding Permissions scope, I should have been mentioned the MS learn that I followed.

These are the permissions scopes that are required for the Azure AD/ Entra app ExternalConnection.ReadWrite.OwnedBy permission. ExternalItem.ReadWrite.OwnedBy permission.

Please add details about the error that you got to be able to investigate.

I have already did PR with a few changes and waiting for approval. I'll add these the changes to read me file soon.