cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Carl__D
Helper I
Helper I

Access token is empty - HTTP

Hello,

 

I'm hoping someone can help!

 

I have used an HTTP request to create a Private Channel in Teams and make myself an owner, using OAuth authentication. This works.

 

I would like to add another owner to this channel so have triggered another HTTP call: 

Carl__D_0-1623252411444.png

But this returns: "InvalidAuthenticationToken", "Access token is empty.",

 

I believe you have to set the Headers to:

Authorization: Bearer {Token}

 

But how can I get this token?

 

I have tried a POST:

'https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token'

 

With body:

client_id=xxx
&username=xxx
&password=xxx

&scope=user.read%20openid%20profile%20offline_access
&grant_type=password

 

But continually getting errors so must be missing something!

 

Any help would be much appreciated. 

 

Thanks

1 REPLY 1
AndiRodi
Advocate II
Advocate II

Hi Carl, 

 

here is my configuration.

under the red stripe should put you Tenant ID.

The other fields into the HTTP Request's body represents exactly: your tenant ID, you Client ID (APP registration ID) and the related secret key (app registration secret key - from AAD)

 

AndiRodi_0-1628148557835.png

 

hope it's helpful for you.

 

Andi

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,958)