mohsinonxrm / D365WebAPIWithMSAL

Shows how to use MSAL.NET with Dynamics 365 WebAPI in dotnet core
2 stars 0 forks source link

Content: {"error":{"code":"0x80072560","message":"The user is not a member of the organization."}} #1

Open InnovationUnplugged opened 4 years ago

InnovationUnplugged commented 4 years ago

Hi, I am able to obtain teh token with this code snippet but when i use it to call a Dynamics365 WhoAmI web service i get this: Token acquired Failed to call the Web Api: Forbidden Content: {"error":{"code":"0x80072560","message":"The user is not a member of the organization."}}

I followed your blog but this is what i get - can you please help?

Kind regards Piotr

mohsinonxrm commented 4 years ago

@InnovationUnplugged , sorry for the very late reply. Did you try to add the app registration as an application user and assigned a security role to it?

antonioogom commented 11 months ago

I have the same problem "0x80072560" "The user is not a member of the organization."

mohsinonxrm commented 11 months ago

@antonioogom , did you add the App Registration as an Application User in Dataverse Environment and assigned a security role?

Also, this repo is 4 years old and I should probably either update it or archive it.

If you have a .net framework/dotnet core or dotnet 6 onwards application, you should use the Microsoft's support PowerPlatform Dataverse Client: https://github.com/microsoft/PowerPlatform-DataverseServiceClient