Jira automation: Error creating Confluence page: Forbidden (403)
Asked by Gil Solomon:

Hello!

I created an automation rule to create a confluence page from template on a workflow status transition. The rule is running as my user, I'm an admin with full access to the confluence space as well as the templates.  

When the rule is triggered it fails with 403 error and I cannot find any explanation for this nor when searching the community, google or GPT. Any help will be greatly appreciated.

##### [Create page in Confluence](https://snappygifts.atlassian.net/jira/software/c/projects/DEV/settings/automate#/rule/21899900/591171285) {#toc-hId--1423455529}

Error creating Confluence page:  
Forbidden (403)  
![Screenshot 2024-09-16 at 10.20.42.png](https://community.atlassian.com/t5/image/serverpage/image-id/347472i2DF6225E63B068CD/image-size/large?v=v2&px=999 "Screenshot 2024-09-16 at 10.20.42.png")![Screenshot 2024-09-16 at 10.20.50.png](https://community.atlassian.com/t5/image/serverpage/image-id/347473iAC3D9316680F02CB/image-size/large?v=v2&px=999 "Screenshot 2024-09-16 at 10.20.50.png")


Answers:
author: Vikrant Yadav
body: Hi [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915) Welcome to Atlassian Community!

Are you able to create a page under this parent page from UI ?   

It seems that you don't have permission to create a page under the parent page, if you have permission create a page on R\&D space. Give it a try from UI. If it's working from UI then it should work via Automation as well.

Try to create page without Parent and template. Is it working?

Thanks,

Vikrant yadav

comments: author: Gil Solomon
body: [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711) Thank you for your response.

I'm Jira admin and and there are no permissions issues in the UI. I can create all manner of pages anywhere in this space - under Parent or in root, with\\out template and all works fine.![Screenshot 2024-09-16 at 11.32.56.png](https://community.atlassian.com/t5/image/serverpage/image-id/347489i89695069DE420371/image-size/large?v=v2&px=999 "Screenshot 2024-09-16 at 11.32.56.png")![Screenshot 2024-09-16 at 11.32.49.png](https://community.atlassian.com/t5/image/serverpage/image-id/347490iB70BAB36667CC445/image-size/large?v=v2&px=999 "Screenshot 2024-09-16 at 11.32.49.png")


author: Vikrant Yadav
body: [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915) Okay, In this case, try one more thing, delete and re-add the "Create Confluence page" action . If still not working, I suggest you to contact Atlassian support once.


author: Gil Solomon
body: P.S Automation rule fails even without parent and template.


author: Gil Solomon
body: [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711) Thank you for your patience, I also tried that and everything else possible - this thread is now marked with "An Atlassian Support Engineer will review the post and respond on this thread within 2 business days."


author: Vikrant Yadav
body: You're Welcome [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915) !   
I am not able to reproduce the same issue on my machine. So Sorry we can't help you out today.

Hope Atlassian team will post answer soon!


author: Andy Heinzer
body: Hi [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915)

I tried to take a closer look here, but I'm not able to see a clear cause for this. Typically a 403 error is an authorization problem, but from what you have posted here, I can't see why you'd be getting that error. I created a support ticket on your behalf over in <https://getsupport.atlassian.com/servicedesk/customer/portal/23/JST-1043345>

If you can visit the customer portal, there is also an option within the portal to grant our support team data access. While this is not required for us to troubleshoot the problem, it might be helpful for support to have this in order to access the site and recreate the problem there to better understand it.

Andy

comments: author: Gil Solomon
body: [@Andy Heinzer](/t5/user/viewprofilepage/user-id/541137)

Thank you fro stepping in, I visited the portal and allowed data access.


author: Marc - Devoteam
body: Hi [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915)

Welcome to the community.

403 means that user that you used is not allowed to do that.

Can you re-check your credentials?

comments: author: Gil Solomon
body: [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976) Thank you for your reply.

The rule is running as my user, I'm an admin with full access to the confluence space as well as the templates. I created pages and from templates as part of trying to debug this. Everything works except this rule.


author: Marc - Devoteam
body: Hi [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915)

What if you run the rule as automation user.

On the Jira project, on the pages section can you link to the Confluence space and see and create pages?


author: Gil Solomon
body: [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976) Hi, already tried that, the rule was by default running with automation user and when it failed as part of debug I changed it to my user.


author: Marc - Devoteam
body: Hi [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915)

I think the issue is related to the {{issue.sumary}} smart value.

I think this can't be used on creating a Confluence page based on automation, as this is a Jira smart value.

Check if you remove this smart value.


author: Gil Solomon
body: [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976)

I had the same hunch so I removed the smart value and it still failed.


author: Marc - Devoteam
body: Hi [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915)

I would reach out to Atlassian Support, to have them look at the logs.


author: pinky_reddy
body: Hi [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915) Can you share the rule Audit log details to check on the error.

comments: author: Gil Solomon
body: Hey [@pinky_reddy](/t5/user/viewprofilepage/user-id/2679900)

Thanks for the quick response, the log was quite stingy and I copied the response in my post, sharing the full picture.

![Screenshot 2024-09-16 at 10.44.34.png](https://community.atlassian.com/t5/image/serverpage/image-id/347477iB85E7B8180161260/image-size/large?v=v2&px=999 "Screenshot 2024-09-16 at 10.44.34.png")


author: pinky_reddy
body: Hi [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915)

Can you verify if you have permission to create pages in the space where you are trying to create through automation

To confirm that you can try creating from UI.


author: Gil Solomon
body: [@pinky_reddy](/t5/user/viewprofilepage/user-id/2679900)

Yes, I'm an admin with full access to the confluence space as well as the templates. I created pages and from templates as part of trying to debug this. Everything works except this rule.


author: pinky_reddy
body: Hi [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915)

In the recent screenshot you have parent page as Security Requirements.

Try creating under the same parent page you have given in the Automation Rule "Epic Security Requirements Documents" with the template.


author: Gil Solomon
body: [@pinky_reddy](/t5/user/viewprofilepage/user-id/2679900) I changed the automation rule to work with the Parent page I created, just on the off chance that there was some issue with the other page. I still get 403 here.


author: pinky_reddy
body: I would suggest to Try the below [@Gil Solomon](/t5/user/viewprofilepage/user-id/4600915)

1. Change the Template to None in automation and try to create a page without template to troubleshoot and see if its creating

Is the error just forbidden (403) or do you have any details in it apart from 403.


author: Gil Solomon
body: [@pinky_reddy](/t5/user/viewprofilepage/user-id/2679900)

I appreciate your patience.

Tried all of this and every suggestion in this post.

All roads lead to 403


author: pinky_reddy
body: I would suggest reaching out to Atlassian support.


Tags: cloud

cloud-automation

confluence-cloud

jira-cloud