# Service to Service access policies

**URL:** <https://devforum.okta.com/t/service-to-service-access-policies/911>\
**Category:** Questions\
**Created:** [December 15, 2017, 1:35pm UTC](https://devforum.okta.com/t/service-to-service-access-policies/911 "2017-12-15T13:35:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruno.quaresma](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@bruno.quaresma](https://devforum.okta.com/u/bruno.quaresma)\
**Post date:** [December 15, 2017, 1:35pm UTC](https://devforum.okta.com/t/service-to-service-access-policies/911/1 "2017-12-15T13:35:16Z")

</div>

I have two services, A and B, and I want to create an access policy to allow the service A access the service B only if it is inside of an allowed group.

I created a policy like to that to all clients.:

IF Grant type is **client credentials**  
and User is Assigned the app and a member of one of the following **Services Allowed to B Group**  
and scopes **service\_b**

But, even the service A isn’t inside of **Services Allowed to B Group** it can generate a token. ☹

Can someone help me? Thanks!

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [December 15, 2017, 9:59pm UTC](https://devforum.okta.com/t/service-to-service-access-policies/911/2 "2017-12-15T21:59:31Z")

</div>

Is there another policy on your authorization server? I think what is happening is that the policy doesn’t match, so it is going to the next one (and that one matches).

I need a little more information about your config. Also, another quick check is to make sure that the authorization server is the one where your policy is specified.

---

<div class="post-metadata">

**Author:** ![bruno.quaresma](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@bruno.quaresma](https://devforum.okta.com/u/bruno.quaresma)\
**Post date:** [December 18, 2017, 12:48pm UTC](https://devforum.okta.com/t/service-to-service-access-policies/911/3 "2017-12-18T12:48:20Z")

</div>

There is only one policy at the moment and the policy is in the right authorization server.

I will share with you some screenshots.:

 ![19](https://global.discourse-cdn.com/oktadev/original/1X/eb903189bf729f4e3ca6ca16607f05ea8349f091.png)

---

<div class="post-metadata">

**Author:** ![bruno.quaresma](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@bruno.quaresma](https://devforum.okta.com/u/bruno.quaresma)\
**Post date:** [December 18, 2017, 12:48pm UTC](https://devforum.okta.com/t/service-to-service-access-policies/911/4 "2017-12-18T12:48:56Z")

</div>

![35](https://global.discourse-cdn.com/oktadev/original/1X/95002d5b0cf06e8b4147d2db3d1bf01228d13297.png)

---

<div class="post-metadata">

**Author:** ![roopG](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@roopG](https://devforum.okta.com/u/roopG)\
**Post date:** [April 1, 2020, 7:59pm UTC](https://devforum.okta.com/t/service-to-service-access-policies/911/5 "2020-04-01T19:59:20Z")

</div>

I have a similar issues,  
All the requested scopes end up in the token irrespective of the groups the user is member of.

Looks like the Rule dialog box is broken, I saw on the demo videos it has the imaged where the  
**AND Scopes requested** is replaced by **THEN Grant these scopes**

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 23, 2024, 11:03pm UTC](https://devforum.okta.com/t/service-to-service-access-policies/911/6 "2024-01-23T23:03:18Z")

</div>

Closed on January 23, 2024, 11:03pm UTC


