Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
saadashraf
Helper I
Helper I

Having issues while trying to move App MasterUser to ServicePrincipal using .NET Core

AdalServiceException: AADSTS7000215: Invalid client secret is provided

 

One or more errors occurred. (A configuration issue is preventing authentication - check the error message from the server for details.You can modify the configuration in the application registration portal. See https://aka.ms/msal-net-invalid-client for details. Original exception: AADSTS7000215: Invalid client secret is provided.
Trace ID: 0d451672-16a9-4c5a-a21f-14caccc30d00
Correlation ID: c288dc19-b89e-4c42-a1a0-e2923a257253
Timestamp: 2021-02-12 09:27:45Z)

at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at AppOwnsData.Services.AadService.GetAccessToken() in C:\Users\pksaa\Downloads\PowerBI-Developer-Samples-master (3)\PowerBI-Developer-Samples-master\.NET Core\Embed for your customers\AppOwnsData\Services\AadService.cs:line 65
at AppOwnsData.Services.PbiEmbedService.GetPowerBIClient() in C:\Users\pksaa\Downloads\PowerBI-Developer-Samples-master (3)\PowerBI-Developer-Samples-master\.NET Core\Embed for your customers\AppOwnsData\Services\PbiEmbedService.cs:line 33
at AppOwnsData.Services.PbiEmbedService.GetEmbedParams(Guid workspaceId, Guid reportId, Guid additionalDatasetId) in C:\Users\pksaa\Downloads\PowerBI-Developer-Samples-master (3)\PowerBI-Developer-Samples-master\.NET Core\Embed for your customers\AppOwnsData\Services\PbiEmbedService.cs:line 43
at AppOwnsData.Controllers.EmbedInfoController.GetEmbedInfo() in C:\Users\pksaa\Downloads\PowerBI-Developer-Samples-master (3)\PowerBI-Developer-Samples-master\.NET Core\Embed for your customers\AppOwnsData\Controllers\EmbedInfoController.cs:line 45 

1 REPLY 1
Anonymous
Not applicable

Hi @saadashraf ,

 

On windows consider using HttpUtility:UrlEncode(<client_secret>).
Reference Microsoft documentation:
https://docs.microsoft.com/en-us/dotnet/api/system.web.httputility.urlencode?view=netframework-4.8 

 

Or you can recreate the resource.

 

There is also a similar post you can refer:

https://github.com/Azure/azure-libraries-for-net/issues/974

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.