Forum Discussion
Jeroen Bestebreurtje
Oct 10, 2018Copper Contributor
Enable Admin roles in O365 - Enable-PrivilegedRoleAssignment
Hi,
I'm using Powershell to activate Admin roles in O365. Since a week the command below gives an error. Does anyone have an idea why it isn't working anymore?
Command:
Connect-PimService –UserName ""
$roleAssignmentsa = Get-PrivilegedRoleAssignment | Where {$_.RoleName -eq "SharePoint Service Administrator"}
Enable-PrivilegedRoleAssignment -TicketNumber "" -TicketSystem "" –Reason “” –Duration 8 –RoleAssignment $roleAssignmentsa
Error:
Enable-PrivilegedRoleAssignment : An error occurred while processing this request.
At line:1 char:1
+ Enable-PrivilegedRoleAssignment -TicketNumber "" -TicketSystem "" –Re ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Enable-PrivilegedRoleAssignment], DataServiceQueryException
+ FullyQualifiedErrorId : Microsoft.OData.Client.DataServiceQueryException,Microsoft.Azure.ActiveDirectory.PIM.PSModule.Cmdlets.EnablePrivilegedRoleAssignment
6 Replies
Sort By
- aasenomadCopper ContributorHi Jeroen, I know it's been a few years but just wondering did you able to figure it out because I'm facing the same issue?. I think this might be related to ticket and I heard that Microsoft haven't provide the perameter for it but just wondering if there is still work around to pass the ticket parameter.
- Matthew RoerigCopper Contributor
Hi Jeroen,
Try running Get-PrivilegedRoleAssignment without any parameters to see what it returns. Also run $Error[0] | Select * to see more detail on the exception. It almost looks like the query is returning null.
- Jeroen BestebreurtjeCopper Contributor
- Matthew RoerigCopper Contributor
Jeroen,
The module has been updated on 10/3/2018, I would check to see if you have the latest version. Here is a link to the gallery for more details:
- Timothy WormleightonCopper Contributor
Have you figured this out yet? I'm having the same problem.
- Jeroen BestebreurtjeCopper Contributor
No, were still having this issue!