# Invalid Credential error while trying to connect a service principle from Azure

**URL:** <https://community.dynatrace.com/t/invalid-credential-error-while-trying-to-connect-a-service-principle-from-azure/40087>\
**Category:** Cloud platforms\
**Tags:** azure\
**Created:** [June 6, 2023, 1:18pm UTC](https://community.dynatrace.com/t/invalid-credential-error-while-trying-to-connect-a-service-principle-from-azure/40087 "2023-06-06T13:18:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![munawarhossain1](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@munawarhossain1](https://community.dynatrace.com/u/munawarhossain1)\
**Post date:** [June 6, 2023, 1:18pm UTC](https://community.dynatrace.com/t/invalid-credential-error-while-trying-to-connect-a-service-principle-from-azure/40087/1 "2023-06-06T13:18:25Z")

</div>

Hello,

I’m trying to connect a service principle from Azure to monitor a resource group but each time connecting it I’m getting an “Invalid Credential” error. To go a bit deep, I’ve retried to connect the ones which are already connected in our prod env to non- prod they too say the same error.

Any suggestion to fix this please?

 ![Connection.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/24cfa47257fcc2d1e2484320a181e1b68124f4cb.png)

---

<div class="post-metadata">

**Author:** ![Tom\_Eaton](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tom_eaton/32/27852_2.png) [@Tom\_Eaton](https://community.dynatrace.com/u/Tom_Eaton)\
**Post date:** [June 6, 2023, 5:02pm UTC](https://community.dynatrace.com/t/invalid-credential-error-while-trying-to-connect-a-service-principle-from-azure/40087/2 "2023-06-06T17:02:52Z")

</div>

The only small thing I can suggest is to check the Secret Key and other values are clean, so they do not cain any spaces, special or hidden characters.  
You could also check in the AD Logs of Azure and maybe the activity logs and see if there is any activity for your service principle - that might contain more information

---

<div class="post-metadata">

**Author:** ![cjarruvalla](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@cjarruvalla](https://community.dynatrace.com/u/cjarruvalla)\
**Post date:** [September 13, 2023, 8:35am UTC](https://community.dynatrace.com/t/invalid-credential-error-while-trying-to-connect-a-service-principle-from-azure/40087/3 "2023-09-13T08:35:23Z")

</div>

Hello,

This is issue occurred mostly the secret key got expired, please create new secret key value for the appropriate service principal and update the same in Dynatrace azure service monitoring.

Thanks
