cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jvrlic
New Member

Find Tenant Id

Hi all,

 

I work on customization of Dynamics Marketing solution. To send Http request beyond MS platform I need to get auth token:

POST /{tenant}/oauth2/v2.0/token HTTP/1.1

Host: login.microsoftonline.com

Content-Type: application/x-www-form-urlencoded

client_id={id} &

scope={service_url} &

client_secret={secret} &

grant_type=client_credentials

 

How can I find Tenant Id from solution using SDK?

 

Thanks for help.

 

2 REPLIES 2
mcolbert
Advocate V
Advocate V

@jvrlic 

 

You might try getting the ACI Tenant URL from the Organization Entity or PowerShell.

Hi @mcolbert ,

 

thank you for answering.

 

Suggested field ACI Tenant URL in Organization Entity is empty in my case. PowerShell is not a option. 

For authentification I use OAuth client credential granthttps://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow.

I'm preparing publishing my solution in AppSource, and in deployment process or configuration of solution I need to get tenant_id and store it in my configuration entity.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,342)